home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-01-11 | 596.9 KB | 7,547 lines |
- :READ NNR $EXEC D2 NNR130 05/09/92 14:13:14
- /**------------------------------------------------------------------**/00001000
- /** Network News Reader **/00002000
- /** file - nnr exec **/00003000
- /** Main driver exec **/00004000
- /**------------------------------------------------------------------**/00005000
- /**********************************************************************)00006000
- (* Network News Reader/VM (NNR) is a client implementation of *)00007000
- (* Network News Transfer Protocol (NNTP) a.k.a RFC 977 *)00008000
- (**********************************************************************/00009000
- /*========================== NNR HISTORY =============================*/00010000
- /* 08/21/91 M_1.2.0 */00011000
- /* 09/02/91 disk full test (for "Groups Read") */00012000
- /* 09/16/91 M_1.2.1 */00013000
- /* 10/10/91 Replace MAIL and POST screens */00014000
- /* 10/10/91 M_1.2.2 */00015000
- /* 11/29/91 M_1.2.2a */00016000
- /* 12/10/91 added line limit */00017000
- /* 12/21/91 added log/nolog from COURCOUL@VMTECQRO.QRO.ITESM.MX */00018000
- /* 12/21/91 *_1.2.2b */00019000
- /* 01/28/92 *_1.2.2c */00020000
- /* * add post as a parameter to nnr */00021000
- /* * add multiple server capability */00022000
- /* 03/31/92 *_1.2.2d */00023000
- /* * edit mode s (in nnr sitefix) */00024000
- /* * add multiple personal subscriptions */00025000
- /* 05/09/92 *_1.2.2e */00026000
- /*=========================== HISTORY ================================*/00027000
- /** 00028000
- Copyright (C) 1991 Paul J. Campbell 00029000
- 00030000
- This program is free software; you can redistribute it and/or modify00031000
- it under the terms of the MITRE Corporation General Public License a00032000
- published by the MITRE Corporation 00033000
- 00034000
- This program is distributed in the hope that it will be useful, 00035000
- but WITHOUT ANY WARRANTY; without even the implied warranty of 00036000
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00037000
- MITRE General Public License for more details. 00038000
- 00039000
- You should have received a copy of the MITRE General Public License 00040000
- along with this program; if not, write to the MITRE Corporation. 00041000
- 00042000
- **/ 00043000
- /**********************************************************************)00044000
- (* Request: *)00045000
- (* Please send any suggestions/corrections/questions/additions to: *)00046000
- (* *)00047000
- (* Paul Campbell, MS B020 campbell@mitre.org *)00048000
- (* The MITRE Corporation pc@mbunix.mitre.org *)00049000
- (* Burlington Road *)00050000
- (* Bedford, MA 01730 *)00051000
- (* *)00052000
- (**********************************************************************/00053000
- trace(o) 00054000
- address command 00055000
- 'EXEC LINKPROD TCPIP' /*$$$ production link to IBM's FAL*/00056000
- parse arg arguments '(' options 00057000
- low='abcdefghijklmnopqrstuvwxyz' 00058000
- upp='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 00059000
- 'SET CMSTYPE HT' 00060000
- 'NUCXDROP EMULSTSM' 00061000
- 'SET CMSTYPE RT' 00062000
- 'GLOBALV SELECT VMNNTP' 00063000
- call Get_Parms 00064000
- call Get_Args 00065000
- call Set_Globalv 00066000
- if ipaddr^='' then 00067000
- 'GLOBALV SETL IPADDR' ipaddr 00068000
- 'GLOBALV GET IPADDR' 00069000
- parse var ipaddr oct1 '.' oct2 '.' oct3 '.' oct4 00070000
- servaddr=right('0'||d2x(oct1),2)||, 00071000
- right('0'||d2x(oct2),2)||, 00072000
- right('0'||d2x(oct3),2)||, 00073000
- right('0'||d2x(oct4),2) 00074000
- call Verbiage 00075000
- Call Groups2IP(servaddr) /* temporary measure for multiple servers */ 00076000
- call Prep_Print 00077000
- call Main 00078000
- 'GLOBALV GET STATUS' 00079000
- if ^postonly then 00080000
- do 00081000
- call Clean_Up 00082000
- call Check_Print 00083000
- end 00084000
- 'GLOBALV SELECT VMNNTP PURGE' 00085000
- exit(word(status,1)) 00086000
- /*-----------------------------------------------------------------*/ 00087000
- /* get the parameters */ 00088000
- /*-----------------------------------------------------------------*/ 00089000
- Get_Parms: 00090000
- options=translate(options) 00091000
- parse var options 'MAINT' maint . 00092000
- parse var options 'ARTICLES' number . 00093000
- parse var options 'LINES' lines . 00094000
- parse var options 'HEADERS' headers . 00095000
- parse var options 'NEWS' newnews . 00096000
- parse var options 'DAYSBACK' daysback . 00097000
- logposts= ^max(0,min(1,find(options,'NOLOG'))) 00098000
- postonly= max(0,min(1,find(options,'POST'))) 00099000
- parse var options 'IPADDR' ipaddr . 00100000
- if ABBREV('YES',maint,1) then 00101000
- do 00102000
- say '"MAINT" has been superseded by the "Sub/UnS" PFK!' 00103000
- exit(0) 00104000
- end 00105000
- if verify(number,'0123456789')^=0 then number=300 00106000
- if number='' then number=300 00107000
- if verify(lines,'0123456789')^=0 then lines=1500 00108000
- if lines='' then lines=1500 00109000
- if ABBREV('NO',headers,1) then 00110000
- headers='BODY' 00111000
- else 00112000
- headers='ARTICLE' 00113000
- if ABBREV('ALL',newnews,1) then 00114000
- newnews='0' 00115000
- else 00116000
- newnews='1' 00117000
- if verify(daysback,'0123456789')^=0 then daysback=7 00118000
- if daysback='' then daysback=7 00119000
- if verify(ipaddr,'0123456789.')^=0 then 00120000
- do 00121000
- say '"'ipaddr'" is an invalid form of ip address, using default!' 00122000
- ipaddr='' 00123000
- end 00124000
- return 00125000
- /*-----------------------------------------------------------------*/ 00126000
- /* get the arguments */ 00127000
- /*-----------------------------------------------------------------*/ 00128000
- Get_Args: 00129000
- 'GLOBALV SETL NEWSGROUP' strip(arguments) 00130000
- if arguments='' then return 00131000
- if words(arguments)> 1 then 00132000
- do 00133000
- say 'We only accept 1 group as an argument, processing will', 00134000
- ' continue as normal.' 00135000
- 'GLOBALV SETL NEWSGROUP' 00136000
- end 00137000
- Return 00138000
- /*-----------------------------------------------------------------*/ 00139000
- /* set/initialize all requisite global variables */ 00140000
- /*-----------------------------------------------------------------*/ 00141000
- Set_Globalv: 00142000
- 'GLOBALV SETL THISNODE Yournode.Domain.Ext' /*$$$ Your Domain*/00143000
- 'GLOBALV SETL ORGANIZATION Your Organization' /*$$$ Your Organization*/00144000
- 'GLOBALV SETL MAILER XMAILER' /*$$$ Columbia MAILER or SMTP*/00145000
- 'GLOBALV SETL IPADDR 000.000.000.000' /*$$$ IP address of server*/00146000
- 'GLOBALV SETL PARM' arguments '(' options 00147000
- 'GLOBALV SET VERSION S_1.2.2e' 00148000
- 'GLOBALV SET STATUS OK' 00149000
- 'GLOBALV SET PROBLEM' 00150000
- 'GLOBALV SET DISKFULL NO' 00151000
- 'GLOBALV SET SUBJECT' 00152000
- 'GLOBALV SET NUMBER' number 00153000
- 'GLOBALV SET LINES' lines 00154000
- 'GLOBALV SET HEADERS' headers 00155000
- 'GLOBALV SET NEWNEWS' newnews 00156000
- 'GLOBALV SET PRINT 0' 00157000
- 'GLOBALV SET DAYSBACK' daysback 00158000
- 'GLOBALV SET SOCKET' 00159000
- 'GLOBALV SET LOGPOSTS' logposts 00160000
- 'GLOBALV SET POSTONLY' postonly 00161000
- 'GLOBALV SET CURRHLIQ OFF' 00162000
- return 00163000
- /*-----------------------------------------------------------------*/ 00164000
- /* clean up utility files */ 00165000
- /*-----------------------------------------------------------------*/ 00166000
- Clean_up: 00167000
- 'GLOBALV GET DISKFULL' 00168000
- 'GLOBALV GET IPADDR' 00169000
- if diskfull ^= 'NO' then 00170000
- do 00171000
- say "Cannot save session activity (disk is full)!" 00172000
- 'SET CMSTYPE HT' 00173000
- 'ERASE Groups New A' 00174000
- 'SET CMSTYPE RT' 00175000
- return 00176000
- end 00177000
- 'SET CMSTYPE HT' 00178000
- 'RENAME' servaddr 'NNReader A Groups Temp A' 00179000
- 'RENAME Groups New A' servaddr 'NNReader A' 00180000
- if rc^=0 then 00181000
- 'RENAME Groups Temp A' servaddr 'NNReader A' 00182000
- 'ERASE Groups Temp A' 00183000
- 'SET CMSTYPE RT' 00184000
- return 00185000
- /*-----------------------------------------------------------------*/ 00186000
- /* main routine */ 00187000
- /*-----------------------------------------------------------------*/ 00188000
- Main: 00189000
- 'GLOBALV GET NEWSGROUP' 00190000
- Call NewGroups(servaddr) 00191000
- say 'Collecting Network News...' 00192000
- 'XEDIT $NNTP$ $LISTS$ S (PROFILE NNR$XEDI' /*$$$ XEDIT version or*/00193000
- return 00194000
- /*-----------------------------------------------------------------*/ 00195000
- /* stack date and time of last server access for NEWGROUPS */ 00196000
- /*-----------------------------------------------------------------*/ 00197000
- NewGroups: Procedure 00198000
- arg servaddr 00199000
- 'GLOBALV GET DAYSBACK' 00200000
- mmddyy=date('U') 00201000
- hhmmss=time() 00202000
- 'SET CMSTYPE HT' 00203000
- 'LISTFILE' servaddr 'NNReader A (LABEL LIFO' 00204000
- lrc=rc 00205000
- 'SET CMSTYPE RT' 00206000
- if lrc=0 then 00207000
- do 00208000
- pull line 00209000
- parse var line . . . . . . . mmddyy hhmmss . 00210000
- end 00211000
- parse var mmddyy month '/' day '/' year 00212000
- parse var hhmmss hour ':' minute ':' second 00213000
- yymmdd=year||right('0'||month,2)||day 00214000
- hhmmss=right('0'||hour,2)||minute||second 00215000
- weekagoyymmdd=weekago(daysback) 00216000
- if weekagoyymmdd<yymmdd then yymmdd=weekagoyymmdd 00217000
- 'GLOBALV SETL NGDATE' hhmmss yymmdd 00218000
- 'GLOBALV SET YYMMDD' substr(yymmdd,3,2)||'/'||substr(yymmdd,5,2)||, 00219000
- '/'||substr(yymmdd,1,2) 00220000
- return 00221000
- /*-----------------------------------------------------------------*/ 00222000
- /* Set up virtual printer */ 00223000
- /*-----------------------------------------------------------------*/ 00224000
- prep_print: 00225000
- 'EXECIO 0 CP (STRING DEF 00E AS 02E' 00226000
- 'EXECIO 0 CP (STRING DEF PRT AS 00E' 00227000
- 'EXECIO 0 CP (STRING '||, 00228000
- 'SPOOL 00E TO' userid() 'CONT CLASS A' 00229000
- 'ERASE NET_NEWS _OUTPUT_' 00230000
- return 00231000
- /*-----------------------------------------------------------------*/ 00232000
- /* Check to see if we need to print. */ 00233000
- /*-----------------------------------------------------------------*/ 00234000
- Check_Print: 00235000
- cpline='' 00236000
- 'EXECIO 0 CP (STRING CLOSE 00E NAME NET_NEWS _OUTPUT_' 00237000
- 'EXECIO 1 CP (VAR CPLINE STRING SPOOL 00E CLOSE' 00238000
- 'EXECIO 0 CP (STRING DETACH 00E' 00239000
- 'EXECIO 0 CP (STRING DEF 02E AS 00E' 00240000
- if cpline^='' then 00241000
- do 00242000
- 'EXECIO 0 CP (STRING ORDER RDR' word(cpline,3) 00243000
- if rc^=0 then 00244000
- do 00245000
- say 'Lost printed articles!' 00246000
- end 00247000
- else 00248000
- do 00249000
- 'DEPRINT NET_NEWS _OUTPUT_' 00250000
- if rc=0 then 00251000
- do 00252000
- 'EXEC DPRINT NET_NEWS _OUTPUT_ ( CC YES' /*$$$ print cmd*/00253000
- 'ERASE NET_NEWS _OUTPUT_' 00254000
- end 00255000
- else 00256000
- do 00257000
- say 'Bad return DEPRINT('rc')! You must print the file', 00258000
- '"NET_NEWS _OUTPUT_"' 00259000
- say 'manually. It should be in the RDR!' 00260000
- 'ERASE NET_NEWS _OUTPUT_' 00261000
- end 00262000
- end 00263000
- end 00264000
- return 00265000
- /*-----------------------------------------------------------------*/ 00266000
- /* Display contract stuff to a new nnr user. */ 00267000
- /*-----------------------------------------------------------------*/ 00268000
- verbiage: 00269000
- 'SET CMSTYPE HT' 00270000
- 'STATE' servaddr 'NNReader A' 00271000
- src=rc 00272000
- 'SET CMSTYPE RT' 00273000
- if src=0 then Return 00274000
- say 'NNR version S_1.2.2e, Copyright (C) 1991,1992 Paul J. Campbell' 00275000
- say 'NNR comes with ABSOLUTELY NO WARRANTY; for details type '00276000
- say '"TYPE MITRE LICENSE" ' 00277000
- say 'This is free software, and you are welcome to redistribute it '00278000
- say 'under certain conditions; type "TYPE MITRE LICENSE". ' 00279000
- return 00280000
- /*-----------------------------------------------------------------*/ 00281000
- /* Display contract stuff to a new nnr user. */ 00282000
- /*-----------------------------------------------------------------*/ 00283000
- weekago:procedure 00284000
- arg daysback 00285000
- mmddyy=date('U') 00286000
- parse var mmddyy month '/' day '/' year 00287000
- julian=date('J') 00288000
- parse var julian 1 thisyear 3 thisday 00289000
- m.1=31 00290000
- /* at some point determine if leap year */ 00291000
- m.2=28 00292000
- m.3=31 00293000
- m.4=30 00294000
- m.5=31 00295000
- m.6=30 00296000
- m.7=31 00297000
- m.8=31 00298000
- m.9=30 00299000
- m.10=31 00300000
- m.11=30 00301000
- m.12=31 00302000
- newday=day*1 00303000
- newmonth=month*1 00304000
- newyear=year*1 00305000
- if daysback>=365 then 00306000
- do 00307000
- say 'We only go back 365 days!' 00308000
- newyear=newyear-1 00309000
- year=right('00'||newyear,2) 00310000
- return(year||month||day) 00311000
- end 00312000
- if thisday>daysback then /* it is this year */ 00313000
- do 00314000
- daysback=thisday-daysback 00315000
- month2days=0 00316000
- do i=1 to newmonth 00317000
- savem2d=month2days 00318000
- month2days=month2days+m.i 00319000
- if month2days>=daysback then 00320000
- do 00321000
- if i>1 then 00322000
- do 00323000
- newmonth=i 00324000
- daysback=daysback-savem2d 00325000
- newday=max(1,min(m.newmonth,daysback)) 00326000
- day=right('00'||newday,2) 00327000
- month=right('00'||newmonth,2) 00328000
- return(year||month||day) 00329000
- end 00330000
- else 00331000
- do 00332000
- newday=max(1,min(31,daysback)) 00333000
- day=right('00'||newday,2) 00334000
- return(year||'01'||day) 00335000
- end 00336000
- end 00337000
- end 00338000
- end 00339000
- else /* we are talking last year */ 00340000
- do 00341000
- newyear=newyear-1 00342000
- year=right('00'||newyear,2) 00343000
- daysback=daysback-thisday 00344000
- month2days=0 00345000
- do i=12 to newmonth by -1 00346000
- month2days=month2days+m.i 00347000
- if month2days>daysback then 00348000
- do 00349000
- if i<12 then 00350000
- do 00351000
- newmonth=i 00352000
- daysback=month2days-daysback 00353000
- newday=max(1,min(m.newmonth,daysback)) 00354000
- day=right('00'||newday,2) 00355000
- month=right('00'||newmonth,2) 00356000
- return(year||month||day) 00357000
- end 00358000
- else 00359000
- do 00360000
- newday=max(1,min(31,31-daysback)) 00361000
- day=right('00'||newday,2) 00362000
- return(year||'12'||day) 00363000
- end 00364000
- end 00365000
- end 00366000
- end 00367000
- say 'Flawed logic, daysback!' 00368000
- return(yymmdd) 00369000
- /*-----------------------------------------------------------------*/ 00370000
- /* rename "Groups Read" for hex(ipaddr) Read *temporary* */ 00371000
- /*-----------------------------------------------------------------*/ 00372000
- Groups2IP:procedure 00373000
- arg servaddr 00374000
- 'SET CMSTYPE HT' 00375000
- 'RENAME Groups Read A' servaddr 'NNReader A' 00376000
- 'SET CMSTYPE RT' 00377000
- Return 00378000
- :READ NNRLIST $EXEC D2 NNR130 05/09/92 14:21:13
- /**------------------------------------------------------------------**/00001000
- /** file - NNR LIST driver **/00002000
- /**------------------------------------------------------------------**/00003000
- /*====================== NNRLIST HISTORY ============================*/00004000
- /* 01/04/92 created */00005000
- /* * add novalue routine for compile */00006000
- /* * add multi-server support */00007000
- /* 03/31/92 1.2.2d - must be run with nnr 1.2.2d (with RXSSTAT) */00008000
- /* 05/09/92 1.2.2e */00009000
- /*=========================== HISTORY ================================*/00010000
- /** 00011000
- Copyright (C) 1991 Paul J. Campbell 00012000
- 00013000
- This program is free software; you can redistribute it and/or modify00014000
- it under the terms of the MITRE Corporation General Public License a00015000
- published by the MITRE Corporation 00016000
- 00017000
- This program is distributed in the hope that it will be useful, 00018000
- but WITHOUT ANY WARRANTY; without even the implied warranty of 00019000
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020000
- MITRE General Public License for more details. 00021000
- 00022000
- You should have received a copy of the MITRE General Public License 00023000
- along with this program; if not, write to the MITRE Corporation. 00024000
- **/ 00025000
- signal on novalue 00026000
- trace('N') 00027000
- Address COMMAND 00028000
- arg ipaddr 00029000
- MODE='A' 00030000
- 'GLOBALV SELECT VMNNTP' 00031000
- 'GLOBALV SETL SOCKET' 00032000
- 'GLOBALV SETL IPADDR 000.000.000.000' 00033000
- if ipaddr='' then 00034000
- 'GLOBALV GET IPADDR' 00035000
- nntprc=RXInital(IPADDR) 00036000
- say nntprc 00037000
- if word(nntprc,1)^='200' & word(nntprc,1)^='201' then 00038000
- do 00039000
- say nntprc 00040000
- nntprc=NEWSQuit() 00041000
- nntprc=RXTermin() 00042000
- Exit(1) 00043000
- end 00044000
- list.='' 00045000
- nntprc=TEXT_Response('LIST') 00046000
- If word(nntprc,1)^='-1' Then 00047000
- if word(Check_Status(),1)^='215' then 00048000
- do 00049000
- say nntprc 00050000
- nntprc=NEWSQuit() 00051000
- nntprc=RXTermin() 00052000
- Exit(1) 00053000
- end 00054000
- Call Split_Response 00055000
- i=0 00056000
- list.='' 00057000
- do l=1 to item.0 00058000
- if index(word(item.l,4),'=')=0 then 00059000
- do 00060000
- i=i+1 00061000
- list.i=item.l 00062000
- end 00063000
- end 00064000
- list.0=i 00065000
- Call SortList 00066000
- do i=1 to list.0 00067000
- status=STATUS_Response('GROUP' word(list.i,1)) 00068000
- list.i=word(list.i,1) word(status,4) word(status,3) word(list.i,4) 00069000
- end 00070000
- nntprc=NEWSQuit() 00071000
- nntprc=RXTermin() 00072000
- 'EXECIO * DISKW NNTP TEMP' mode '0 V 80 (FINIS STEM LIST.' 00073000
- parse var ipaddr oct1 '.' oct2 '.' oct3 '.' oct4 00074000
- servaddr=right('0'||d2x(oct1),2)||, 00075000
- right('0'||d2x(oct2),2)||, 00076000
- right('0'||d2x(oct3),2)||, 00077000
- right('0'||d2x(oct4),2) 00078000
- /* next 2 statements for migration from old method to multi-server */ 00079000
- 'RENAME NNTP GROUPS' mode servaddr 'GROUPS' mode 00080000
- 'RENAME NNTP OLDGROUPS' mode servaddr 'OLDGROUP' mode 00081000
- /**/ 00082000
- 'ERASE' servaddr 'OLDGROUP' mode 00083000
- 'RENAME' servaddr 'GROUPS' mode servaddr 'OLDGROUP' mode 00084000
- 'RENAME NNTP TEMP' mode servaddr 'GROUPS' mode 00085000
- Exit(0) 00086000
- /*-----------------------------------------------------------------*/ 00087000
- /* Routine Handle signal novalue */ 00088000
- /*-----------------------------------------------------------------*/ 00089000
- NOVALUE: 00090000
- parse source . . myname . 00091000
- say "NOVALUE error in" myname "line" sigl":" 00092000
- say "Source line>" sourceline(sigl) 00093000
- exit(999) 00094000
- /*-----------------------------------------------------------------*/ 00095000
- /* Routine to sort list */ 00096000
- /* Standard "Shell Sort" (textbook version) */ 00097000
- /*-----------------------------------------------------------------*/ 00098000
- SortList: 00099000
- Procedure Expose List. 00100000
- Gap = 1 00101000
- Length = List.0 00102000
- Do While ( Gap < Length ) 00103000
- Gap = Gap * 2 00104000
- End 00105000
- Do While ( Gap > 1 ) 00106000
- Gap = Gap % 2 00107000
- Limit = Length - Gap 00108000
- Do Scan = 1 To Limit 00109000
- NextHigher= Scan + Gap 00110000
- If Substr(List.Scan,1,25) > substr(List.NextHigher,1,25) Then 00111000
- Do 00112000
- Temp = List.NextHigher 00113000
- List.NextHigher = List.Scan 00114000
- Do Bubble = Scan-Gap To 1 By -Gap , 00115000
- While (Substr(Temp,1,25)<Substr(List.Bubble,1,25)) 00116000
- NextHigher= Bubble + Gap 00117000
- List.NextHigher = List.Bubble 00118000
- End 00119000
- Bubble = Bubble + Gap 00120000
- List.Bubble = Temp 00121000
- End 00122000
- End 00123000
- End 00124000
- Return 00125000
- /**********************************************************************/00126000
- /* Initialize RXSOCKET */00127000
- /**********************************************************************/00128000
- RXInital:Procedure expose socket 00129000
- parse arg args 00130000
- if Socket('Initialize', 'NNTPConn') = '-1' Then 00131000
- Return('-1 INITIALIZE '||errno) 00132000
- socket = Socket('Socket', 'AF_INET', 'Sock_Stream') 00133000
- If socket="-1" Then 00134000
- Return('-1 SOCKET '||errno) 00135000
- 'GLOBALV SETL SOCKET' socket 00136000
- name = AF_INET||Htons(119)||Inet_Addr(word(args,1)) 00137000
- rc = Socket('Connect', socket, name) 00138000
- If rc="-1" Then 00139000
- Return('-1 CONNECT '||errno) 00140000
- status=STATUS_Response('') 00141000
- Return(status) 00142000
- /**********************************************************************/00143000
- /* Terminate NEWS Session */00144000
- /**********************************************************************/00145000
- RXTermin:Procedure expose socket 00146000
- If Socket('Close', socket) = '-1' Then 00147000
- Say 'CLOSE '||errno 00148000
- If Socket('Terminate', 'NNTPConn') = '-1' Then 00149000
- Return('-1 TERMINATE '||errno) 00150000
- Return(0) 00151000
- /**********************************************************************/00152000
- /* QUIT the server */00153000
- /**********************************************************************/00154000
- NEWSQuit:Procedure expose socket 00155000
- status=STATUS_Response('QUIT') 00156000
- if word(Status,1)='205' then 00157000
- Status=0 00158000
- Return(Status) 00159000
- /**********************************************************************/00160000
- /* Check Status Response (ends with cr lf) */00161000
- /**********************************************************************/00162000
- STATUS_Response: procedure expose socket line 00163000
- parse arg command 00164000
- status=0 00165000
- if command ^='' then 00166000
- status=NEWS_Command(command) 00167000
- If word(Status,1)^='-1' Then 00168000
- do 00169000
- line = "" 00170000
- pattern='0D0A'x 00171000
- Do Forever 00172000
- bytes_in = Socket('Read', socket, 'data') 00173000
- If bytes_in="-1" Then Return('-1 READ '||errno) 00174000
- line = line || data 00175000
- If bytes_in=0 | index(data,pattern)>0 then 00176000
- Leave 00177000
- End 00178000
- Parse Var line data '0D0A'x . 00179000
- Status=A2E(data) 00180000
- End 00181000
- Return(status) 00182000
- /**********************************************************************/00183000
- /* Check TEXT Response (ends with a .) */00184000
- /**********************************************************************/00185000
- TEXT_Response: procedure expose socket line 00186000
- parse arg command 00187000
- status=NEWS_Command(command) 00188000
- If word(Status,1)^='-1' Then 00189000
- do 00190000
- status=0 00191000
- line = "" 00192000
- pattern='0D0A'x||E2A('.')||'0D0A'x 00193000
- Do Forever 00194000
- bytes_in = Socket('Read', socket, 'data') 00195000
- If bytes_in="-1" Then Return('-1 READ '||errno) 00196000
- line = line || data 00197000
- test=substr(line,length(line)-4) 00198000
- If bytes_in=0 | index(test,pattern)>0 then 00199000
- Leave 00200000
- End 00201000
- End 00202000
- Return(status) 00203000
- /**********************************************************************/00204000
- NEWS_Command:Procedure expose socket 00205000
- parse arg command 00206000
- data = E2A(command) || '0D0A'x 00207000
- bytes_out = Socket('Write', socket, data) 00208000
- If bytes_out="-1" Then Return('-1 WRITE '||errno) 00209000
- Return(0) 00210000
- /**********************************************************************/00211000
- /* Check Status */00212000
- /**********************************************************************/00213000
- Check_Status:Procedure expose line 00214000
- Parse Var line data '0D0A'x line 00215000
- Return(A2E(data)) 00216000
- /**********************************************************************/00217000
- /* Split Response Buffer */00218000
- /**********************************************************************/00219000
- Split_Response:Procedure expose line item. 00220000
- item.='' 00221000
- i=0 00222000
- Do Forever 00223000
- If line="" Then Leave 00224000
- Parse Var line data '0D0A'x line 00225000
- i=i+1 00226000
- item.i=A2E(data) 00227000
- End 00228000
- item.i='' 00229000
- item.0=i-1 00230000
- Return 00231000
- /**********************************************************************/00232000
- /* A2E EXEC simple ascii to ebcdic translate by JCA */00233000
- /**********************************************************************/00234000
- A2E: 00235000
- return translate(arg(1), , 00236000
- '00010203372D2E2F1605250B0C0D0E0F'x||, 00237000
- '101112133C3D322618193F271C1D1E1F'x||, 00238000
- '405A7F7B5B6C507D4D5D5C4E6B604B61'x||, 00239000
- 'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'x||, 00240000
- '7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'x||, 00241000
- 'D7D8D9E2E3E4E5E6E7E8E9ADE0BD716D'x||, 00242000
- '79818283848586878889919293949596'x||, 00243000
- '979899A2A3A4A5A6A7A8A9C04FD05F07'x||, 00244000
- '00010203372D2E2F1605250B0C0D0E0F'x||, 00245000
- '101112133C3D322618193F271C1D1E1F'x||, 00246000
- '405A7F7B5B6C507D4D5D5C4E6B604B61'x||, 00247000
- 'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'x||, 00248000
- '7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'x||, 00249000
- 'D7D8D9E2E3E4E5E6E7E8E9ADE0BD716D'x||, 00250000
- '79818283848586878889919293949596'x||, 00251000
- '979899A2A3A4A5A6A7A8A98B4F9B5F07'x) 00252000
- /**********************************************************************/00253000
- /* E2A EXEC simple ebcdic to ascii translate by JCA */00254000
- /**********************************************************************/00255000
- E2A: 00256000
- return translate(arg(1), , 00257000
- '000102030009007F0000000B0C0D0E0F'x||, 00258000
- '1011121300000800181900001C1D1E1F'x||, 00259000
- '00000000000A171B0000000000050607'x||, 00260000
- '0000160000000004000000001415001A'x||, 00261000
- '20000000000000000000002E3C282B7C'x||, 00262000
- '2600000000000000000021242A293B7E'x||, 00263000
- '2D2F0000000000000000002C255F3E3F'x||, 00264000
- '005E00000000000000603A2340273D22'x||, 00265000
- '00616263646566676869007B00000000'x||, 00266000
- '006A6B6C6D6E6F707172007D00000000'x||, 00267000
- '007E737475767778797A0000005B0000'x||, 00268000
- '000000000000000000000000005D0000'x||, 00269000
- '7B414243444546474849000000000000'x||, 00270000
- '7D4A4B4C4D4E4F505152000000000000'x||, 00271000
- '5C00535455565758595A000000000000'x||, 00272000
- '30313233343536373839000000000000'x) 00273000
- :READ NNR$ARTI $XEDIT D2 NNR130 05/09/92 14:12:34
- /**------------------------------------------------------------------**/00001000
- /** Network News Reader **/00002000
- /** file - nnr$arti xedit **/00003000
- /** Article **/00004000
- /**------------------------------------------------------------------**/00005000
- /*====================== NNR$ARTI HISTORY ============================*/00006000
- /* 08/21/91 M_1.2.0 */00007000
- /* 09/09/91 increased input line to 255 */00008000
- /* 09/10/91 add rot13 JEFF@MITVMA.MIT.EDU */00009000
- /* 08/21/91 M_1.2.1 */00010000
- /* 10/10/91 Replace MAIL and POST screens */00011000
- /* 10/10/91 M_1.2.2 */00012000
- /* 11/12/91 fix posting */00013000
- /* 11/29/91 M_1.2.2a */00014000
- /* 12/08/91 add next group function (previous group PG from cmd line) */00015000
- /* 12/21/91 limit number of line per article */00016000
- /* 12/21/91 fix a few things */00017000
- /* 12/21/91 *_1.2.2b */00018000
- /* * fix from GILMART@lstc2vm.stortek.com */00019000
- /* 01/28/92 *_1.2.2c */00020000
- /* * fix from GILMART@lstc2vm.stortek.com (mail/post '.') */00021000
- /* * eliminate SAVE command */00022000
- /* * add counter article screen */00023000
- /* * add novalue routines (for compile) */00024000
- /* 03/31/92 *_1.2.2d */00025000
- /* * add edit mode s */00026000
- /* 05/09/92 *_1.2.2e */00027000
- /*=========================== HISTORY ================================*/00028000
- /** 00029000
- Copyright (C) 1991 Paul J. Campbell 00030000
- 00031000
- This program is free software; you can redistribute it and/or modify00032000
- it under the terms of the MITRE Corporation General Public License a00033000
- published by the MITRE Corporation 00034000
- 00035000
- This program is distributed in the hope that it will be useful, 00036000
- but WITHOUT ANY WARRANTY; without even the implied warranty of 00037000
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00038000
- MITRE General Public License for more details. 00039000
- 00040000
- You should have received a copy of the MITRE General Public License 00041000
- along with this program; if not, write to the MITRE Corporation. 00042000
- 00043000
- **/ 00044000
- trace('N') 00045000
- signal on novalue 00046000
- Address xedit 00047000
- 'Set ctlchar' '29'x 'escape' 00048000
- 'Set ctlchar @ protect red high' 00049000
- 'Set ctlchar' '4a'x 'protect yellow high' 00050000
- 'Set ctlchar ! protect blue nohigh' 00051000
- 'Set ctlchar $ noprotect turq high' 00052000
- 'Set ctlchar * noprotect white nohigh' 00053000
- 'Set ctlchar & protect pink nohigh' 00054000
- 'Set ctlchar ^ protect green nohigh' 00055000
- 'Extract /lscreen' 00056000
- 'Set msgline on' lscreen.1-3 2 'overlay' 00057000
- 'Set CMDline BOTTOM' 00058000
- 'SET LRECL *' 00059000
- 'SET VERIFY 1 *' 00060000
- 'SET TRUNC *' 00061000
- 'SET ZONE 1 *' 00062000
- 'SET RECFM V' 00063000
- 'SET SPILL WORD' 00064000
- 'SET CURLINE ON 3' 00065000
- 'SET PREFIX OFF' 00066000
- 'SET SCALE OFF' 00067000
- 'SET LINEND OFF' 00068000
- 'SET TABS 1 9 17 25 33 41 49 57 65 73 81 89 97 105 113 121 129 137 145' 00069000
- 'SET IMAGE ON' 00070000
- 'SET PF04 ONLY dummy' 00071000
- 'SET PF16 ONLY dummy' 00072000
- Address COMMAND 'GLOBALV SELECT VMNNTP' 00073000
- Address COMMAND 'GLOBALV GET VERSION' 00074000
- Address COMMAND 'GLOBALV GET HEADERS' 00075000
- Address COMMAND 'GLOBALV GET LINES' 00076000
- Address COMMAND 'GLOBALV GET SUBJECT' 00077000
- /*-----------------------------------------------------------------*/ 00078000
- /* Driver routine for the main menu screen. */ 00079000
- /*-----------------------------------------------------------------*/ 00080000
- ROTin = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; /*MIT*/00081000
- ROTout = 'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM'; /*MIT*/00082000
- message = ''; 00083000
- item.='' 00084000
- if queued()>0 then parse pull group 00085000
- i=0 00086000
- item.0=queued()-1 00087000
- do while (queued()>1) 00088000
- i=i+1 00089000
- parse pull item.i 00090000
- if left(item.i,1)='.' then 00091000
- item.i=substr(item.i,2) 00092000
- 'INPUT' item.i 00093000
- 'Extract /curline' 00094000
- item.i = curline.3 00095000
- end 00096000
- parse pull junk 00097000
- if item.0>=lines then 00098000
- Message='Too many lines in article, exceeds limit of' lines 00099000
- scrbot=lscreen.1-4 00100000
- index=0 00101000
- row=3;col=2; 00102000
- flag = 'true'; 00103000
- 'TOP' 00104000
- Address COMMAND 'DESBUF' 00105000
- Do Forever; 00106000
- Call Mainscreen /* display main menu screen */ 00107000
- 'Read Nochange Tag' 00108000
- 'Extract /cursor' 00109000
- row = cursor.1; col = cursor.2; 00110000
- Do Queued(); /* loop for each field changed */ 00111000
- Parse Pull key line column string; /* read reply info */ 00112000
- Select; 00113000
- When key = "CMD" Then Call CommandLine 00114000
- When key = "ETK" Then Call EnterKey 00115000
- When key = "PFK" Then Call PFKeys 00116000
- otherwise Nop 00117000
- End 00118000
- End 00119000
- if flag^='true' then 00120000
- do 00121000
- Address COMMAND 'DESBUF' 00122000
- push flag 00123000
- 'QQUIT' 00124000
- Exit 00125000
- End 00126000
- End 00127000
- /*-----------------------------------------------------------------*/ 00128000
- /* Routine Handle signal novalue */ 00129000
- /*-----------------------------------------------------------------*/ 00130000
- NOVALUE: 00131000
- parse source . . myname . 00132000
- say "NOVALUE error in" myname "line" sigl":" 00133000
- say "Source line>" sourceline(sigl) 00134000
- Call WhichGroup('QUIT') 00135000
- Address COMMAND 'DESBUF' 00136000
- push 'QUIT' 00137000
- 'QQUIT' 00138000
- exit(999) 00139000
- /*-----------------------------------------------------------------*/ 00140000
- /* Routine to display the main menu screen. */ 00141000
- /*-----------------------------------------------------------------*/ 00142000
- Mainscreen: /* set each line of the screen */ 00143000
- 'Set Reserved 1 noh' '29'x'@ ', 00144000
- center('*** NNR/VM ('||version||') ***',35), 00145000
- right('Article',25), 00146000
- '29'x'! ' 00147000
- 'Set Reserved 2 noh' '29'x'@'||'#'||left(subject,78)||'29'x'!' 00148000
- 'Extract /flscreen' 00149000
- 'Set Reserved 3 noh' '29'x'@'||group||, 00150000
- ' (Lines='||flscreen.1||'/'||item.0||')'||'29'x'!' 00151000
- 'Set Reserved' lscreen.1-3 'Noh' 00152000
- 'Set Reserved' lscreen.1-2 'high', 00153000
- ' 1= Help ', 00154000
- ||'2= Next ', 00155000
- ||'3= Quit ', 00156000
- ||' 4= Previous ', 00157000
- ||' 5= PostMail ', 00158000
- ||' 6= HeadBody' 00159000
- 'Set Reserved' lscreen.1-1 'high', 00160000
- ' 7= Backward ', 00161000
- ||'8= Forward ', 00162000
- ||'9= Print ', 00163000
- ||'10= Rot13 ', /* MIT */ 00164000
- ||'11= Log ', 00165000
- ||'12= NxtGroup' 00166000
- If message ^= "" Then 00167000
- Do; 00168000
- 'EMSG' message 00169000
- message = ''; 00170000
- End; 00171000
- 'Cursor cmdline' 00172000
- Return; 00173000
- /*-----------------------------------------------------------------*/ 00174000
- /* Routine to pick off the ENTER Key. */ 00175000
- /*-----------------------------------------------------------------*/ 00176000
- EnterKey: 00177000
- row=lscreen.1; col=7 00178000
- Return 00179000
- /*-----------------------------------------------------------------*/ 00180000
- /* Routine to pick off the command line. */ 00181000
- /*-----------------------------------------------------------------*/ 00182000
- CommandLine: 00183000
- XeditCommand=strip(line||' '||column||' '||string); 00184000
- If Abbrev('INPUT',translate(line),1) then 00185000
- Message='INPUT command is not currently supported!' 00186000
- Else If Abbrev('XEDIT',translate(line),1) then 00187000
- Message='XEDIT command is not currently supported!' 00188000
- Else If Abbrev('MACRO',translate(line),2) then 00189000
- Message='MACRO command is not currently supported!' 00190000
- Else If (Abbrev('QQUIT',translate(line),2) |, 00191000
- translate(XeditCommand) = 'QUIT') Then 00192000
- Call WhichGroup('QUIT') 00193000
- Else If Abbrev('NGROUP',translate(line),2) Then 00194000
- Call WhichGroup('NEXT') 00195000
- Else If Abbrev('PGROUP',translate(line),2) Then 00196000
- Call WhichGroup('PREV') 00197000
- Else If (translate(line) = 'LOG') Then 00198000
- Call Log 00199000
- Else 00200000
- XeditCommand 00201000
- Return 00202000
- /*-----------------------------------------------------------------*/ 00203000
- /* Routine to handle the PFKs key. */ 00204000
- /*-----------------------------------------------------------------*/ 00205000
- PFKeys: 00206000
- XeditCommand='' 00207000
- Call PFKmap 00208000
- If Line=1 then Call NNR$HELP 00209000
- else If Line=2 then flag='NEXT' 00210000
- else If Line=3 then Call WhichGroup('QUIT') 00211000
- else If Line=4 then flag='LAST' 00212000
- else If Line=5 then Call PostMail 00213000
- else If Line=6 then flag='HEADBODY' 00214000
- else If Line=7 then 'BACKWARD' 00215000
- else If Line=8 then 'FORWARD' 00216000
- else If Line=9 then Call Print 00217000
- else If Line=10 then Call Rot13 /* MIT */ 00218000
- else If Line=11 then Call Log 00219000
- else If Line=12 then Call WhichGroup('NEXT') 00220000
- else message='Unsupported PFK' 00221000
- Return 00222000
- /*-----------------------------------------------------------------*/ 00223000
- /* Routine to handle PFK Mapping. */ 00224000
- /*-----------------------------------------------------------------*/ 00225000
- PFKmap: 00226000
- if line>12 then line=line-12 00227000
- Return 00228000
- /*-----------------------------------------------------------------*/ 00229000
- /* Routine to pick off the ENTER Key. */ 00230000
- /*-----------------------------------------------------------------*/ 00231000
- WhichGroup: 00232000
- arg which 00233000
- flag='QUIT' 00234000
- Address COMMAND 'GLOBALV SETL MOREGROUPS' which 00235000
- Return 00236000
- /*-----------------------------------------------------------------*/ 00237000
- /* Routine to handle PFK Posting. */ 00238000
- /*-----------------------------------------------------------------*/ 00239000
- PostMail: 00240000
- Address COMMAND 'GLOBALV SETL NEWSGROUP' group 00241000
- If Headers='BODY' Then 00242000
- Address COMMAND 'EXECIO' item.0 'DISKW N$N$T$P$ P$O$S$T$ A', 00243000
- '0 V 150 ( FINIS STEM ITEM.' 00244000
- else 00245000
- do 00246000
- i = 1 00247000
- Do while words(item.i) ^= 0 /* find first blank line */ 00248000
- i = i + 1 00249000
- End 00250000
- Do j=i to item.0 00251000
- Address COMMAND 'EXECIO 1 DISKW N$N$T$P$ P$O$S$T$ A', 00252000
- '0 V 150 ( STRING' item.j 00253000
- End 00254000
- Address COMMAND 'FINIS N$N$T$P$ P$O$S$T$ A' 00255000
- End 00256000
- flag='POST' 00257000
- Return 00258000
- /*-----------------------------------------------------------------*/ 00259000
- /* Routine to handle PFK Log. */ 00260000
- /*-----------------------------------------------------------------*/ 00261000
- Log: 00262000
- if words(XeditCommand)>1 then 00263000
- notebook=translate(word(XeditCommand,2)) 00264000
- else 00265000
- notebook='NNRLOG' 00266000
- Address COMMAND 'DESBUF' 00267000
- Address COMMAND 'EXECIO 1 DISKW' notebook 'NOTEBOOK A 0 V 132', 00268000
- '(STRING' copies('=',72) 00269000
- Address COMMAND 'EXECIO' item.0 'DISKW' notebook 'NOTEBOOK A 0 V 132',00270000
- '( FINIS STEM ITEM.' 00271000
- message='Article has been logged in' notebook 'notebook!' 00272000
- Return 00273000
- /*-----------------------------------------------------------------*/ 00274000
- /* Routine to handle PFK Print. */ 00275000
- /*-----------------------------------------------------------------*/ 00276000
- Print: 00277000
- article_line_count=0 00278000
- do forever 00279000
- Address COMMAND 'EXECIO 1 PRINT (CC DATA STRING 1'||, 00280000
- group||' #'||word(subject,1) 00281000
- do linecount=1 to 55 00282000
- article_line_count=article_line_count+1 00283000
- Address COMMAND 'EXECIO 1 PRINT (CC DATA STRING '||, 00284000
- left(item.article_line_count,132) 00285000
- if article_line_count=item.0 then 00286000
- do 00287000
- message='Article has been appended to printer spool!' 00288000
- Address COMMAND 'GLOBALV SET PRINT 1' 00289000
- Return 00290000
- end 00291000
- end 00292000
- end 00293000
- Return 00294000
- /*-----------------------------------------------------------------*/ 00295000
- /* Routine to handle PFK Rot13 /* MIT */ */ 00296000
- /*-----------------------------------------------------------------*/ 00297000
- Rot13: 00298000
- 'TOP' 00299000
- 'NEXT' 00300000
- i = 1 00301000
- If Headers^='BODY' Then 00302000
- Do while words(item.i) ^= 0 /* find first blank line */ 00303000
- i = i + 1 00304000
- End 00305000
- 'LOCATE :'i 00306000
- Do i = i to item.0 00307000
- if words(item.i) ^= 0 then do 00308000
- item.i = translate(item.i,ROTout,ROTin) 00309000
- 'OVERLAY' item.i 00310000
- end 00311000
- 'NEXT' 00312000
- End 00313000
- 'TOP' 00314000
- Return 00315000
- NNR$HELP: Procedure 00316000
- /**---------------------------------------------------------------**/ 00317000
- /** Network News Reader **/ 00318000
- /** Help **/ 00319000
- /**---------------------------------------------------------------**/ 00320000
- 'Extract /lscreen' 00321000
- 'Set msgline on' lscreen.1-3 '2 overlay' 00322000
- Address COMMAND 'GLOBALV SELECT VMNNTP' 00323000
- Address COMMAND 'GLOBALV GET VERSION' 00324000
- 'SET PF04 ONLY dummy' 00325000
- 'SET PF16 ONLY dummy' 00326000
- message = ''; 00327000
- start=5*18+1 00328000
- scrheader='** Article Screen' 00329000
- helpscr.='' 00330000
- Address COMMAND 'EXECIO 18 DISKR NNRHELP $XSCREEN *', 00331000
- start '(FINI STEM HELPSCR.' 00332000
- Address COMMAND 'DESBUF' 00333000
- Do Forever; 00334000
- Call HELPscreen; /* display main menu screen */ 00335000
- 'Read Nochange Tag' 00336000
- 'Extract /cursor' 00337000
- row = cursor.5; col = cursor.6; 00338000
- num=0 00339000
- Do While(Queued()>0) 00340000
- num=num+1 00341000
- Parse Pull QueuedLine.num 00342000
- end 00343000
- do i=1 to num 00344000
- Parse var QueuedLine.i key line column string; 00345000
- if key = "RES" Then Nop 00346000
- else SaveQueued=QueuedLine.i 00347000
- end 00348000
- Parse Var SaveQueued key line column string; 00349000
- Select 00350000
- When key = "CMD" Then Nop 00351000
- When key = "PFK" Then 00352000
- do 00353000
- If Line=1 then Address COMMAND 'HELP CMS NNR' 00354000
- else If Line=3 then 00355000
- do 00356000
- Do i = 3 to 20 00357000
- 'Set Reserved' i 'off' 00358000
- End 00359000
- Return 00360000
- End 00361000
- else message='Unsupported PFK' 00362000
- end 00363000
- When key = "ETK" Then Nop; 00364000
- otherwise Nop 00365000
- End 00366000
- End /* Do Forever */ 00367000
- Return 00368000
- 00369000
- /*-----------------------------------------------------------------*/ 00370000
- /* Routine to display the main menu screen. */ 00371000
- /*-----------------------------------------------------------------*/ 00372000
- HELPscreen: /* set each line of the screen */ 00373000
- 'Set Reserved 1 noh' '29'x'! ' '29'x'@', 00374000
- center('*** NNR/VM ('||version||') ***',35), 00375000
- right('Help',25), 00376000
- '29'x'! ' 00377000
- 'Set Reserved 2 noh' '29'x'@'||scrheader||'29'x'!' 00378000
- Do i = 3 to 20 00379000
- j=i-2 00380000
- 'Set Reserved' i 'noh' '29'x'!'Left(helpscr.j,78)'29'x'! ' 00381000
- End; 00382000
- Do i = 21 to lscreen.1-4; 00383000
- 'Set Reserved' i 'noh' 00384000
- End; 00385000
- 'Set Reserved' lscreen.1-3 'Noh' 00386000
- 'Set Reserved' lscreen.1-2 'high', 00387000
- ' 1= NNR_Help ', 00388000
- ||'2= ', 00389000
- ||'3= Quit ', 00390000
- ||' 4= ', 00391000
- ||' 5= ', 00392000
- ||' 6= ' 00393000
- 'Set Reserved' lscreen.1-1 'high', 00394000
- ' 7= ', 00395000
- ||'8= ', 00396000
- ||'9= ', 00397000
- ||'10= ', 00398000
- ||'11= ', 00399000
- ||'12= ' 00400000
- If message ^= "" Then 00401000
- Do 00402000
- 'EMSG' message 00403000
- message = '' 00404000
- End; 00405000
- 'Cursor screen' 15 4 00406000
- Return 00407000
- :READ NNR$NOTE $XEDIT D2 NNR130 05/09/92 14:11:47
- /**---------------------------------------------------------------**/ 00001000
- /** Network News Reader **/ 00002000
- /** file - nnr$note xedit **/ 00003000
- /**---------------------------------------------------------------**/ 00004000
- /*====================== NNR$NOTE HISTORY ============================*/00005000
- /* 08/21/91 M_1.2.0 */00006000
- /* 08/21/91 M_1.2.1 */00007000
- /* 10/10/91 Replace MAIL and POST screens */00008000
- /* 10/10/91 M_1.2.2 */00009000
- /* 11/12/91 fix posting */00010000
- /* 11/29/91 M_1.2.2a */00011000
- /* 12/10/91 general fixes from GILMART@lstc2vm.stortek.com */00012000
- /* 12/21/91 *_1.2.2b */00013000
- /* 01/28/92 *_1.2.2c */00014000
- /* 03/31/92 *_1.2.2d */00015000
- /* 05/09/92 *_1.2.2e */00016000
- /*=========================== HISTORY ================================*/00017000
- /** 00018000
- Copyright (C) 1991 Paul J. Campbell 00019000
- 00020000
- This program is free software; you can redistribute it and/or modify00021000
- it under the terms of the MITRE Corporation General Public License a00022000
- published by the MITRE Corporation 00023000
- 00024000
- This program is distributed in the hope that it will be useful, 00025000
- but WITHOUT ANY WARRANTY; without even the implied warranty of 00026000
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00027000
- MITRE General Public License for more details. 00028000
- 00029000
- You should have received a copy of the MITRE General Public License 00030000
- along with this program; if not, write to the MITRE Corporation. 00031000
- 00032000
- **/ 00033000
- trace(o) 00034000
- address xedit 00035000
- 'cms globalv select vmnntp' 00036000
- 'cms globalv get version' 00037000
- 'cms globalv get newsgroup' 00038000
- 'cms globalv get postflag' 00039000
- set case mixed ignore 00040000
- set lrecl '*' 00041000
- set recfm v 00042000
- set trunc '*' 00043000
- set zone '1 *' 00044000
- set spill word 00045000
- set linend off 00046000
- set prefix off 00047000
- set scale off 00048000
- set stay on 00049000
- set nulls on 00050000
- set synonym send 4 command file 00051000
- set synonym cancel 6 command quit 00052000
- set pf01 command help cms note 00053000
- set pf05 command file 00054000
- set pf04 command get userid() 'SIGNATUR' 00055000
- set pf09 command sos linedel 00056000
- set pf13 command help cms note 00057000
- set pf17 command file 00058000
- set pf21 command sos linedel 00059000
- 'set reserved 1 green none high '||, 00060000
- center('*** NNR/VM ('||version||') ***',80) 00061000
- 'set reserved 2 green none high Posting to '||newsgroup 00062000
- 'set reserved -5 green none nohigh '||, 00063000
- '1= Help 2= Add line 3= Quit 4= Sign 5= Save '||, 00064000
- ' 6= ?' 00065000
- 'set reserved -4 green none nohigh '||, 00066000
- '7= Backward 8= Forward 9= Del line 10= Rgtleft 11= Spltjoin '||, 00067000
- '12= Cursor' 00068000
- 'set msgline on -3 13' 00069000
- 'set cmstype ht' 00070000
- cms state n$n$t$p$ p$o$s$t$ a 00071000
- if rc=0 then 00072000
- do 00073000
- get n$n$t$p$ p$o$s$t$ 00074000
- 'TOP' 00075000
- if postflag^='MAIL' & postflag^='RESUME' then 00076000
- do 00077000
- 'CHANGE //>/* 1 ' 00078000
- 'TOP' 00079000
- end 00080000
- do while (Queued()>0) 00081000
- parse pull line 00082000
- 'INPUT' line 00083000
- end 00084000
- 'TOP' 00085000
- end 00086000
- 'set cmstype rt' 00087000
- exit 00088000
- :READ NNR$XEDI $XEDIT D2 NNR130 05/09/92 21:57:59
- /**---------------------------------------------------------------**/ 00001000
- /** Network News Reader **/ 00002000
- /** file nnr$xedi xedit **/ 00003000
- /**---------------------------------------------------------------**/ 00004000
- /*====================== NNR$XEDI HISTORY ============================*/00005000
- /* 08/21/91 M_1.2.0 */00006000
- /* 09/02/91 general fixes */00007000
- /* 09/02/91 handle disk full for "Groups Read" */00008000
- /* 09/02/91 add "reduce" pfk (eliminate "*" from headers screen) */00009000
- /* 09/04/91 add mark/unmark */00010000
- /* 09/14/91 general fixes/clean up */00011000
- /* 09/16/91 M_1.2.1 */00012000
- /* 09/21/91 fix the handling of the first article remembered */00013000
- /* 10/02/91 fix zero out group syndrome */00014000
- /* 10/10/91 replace MAIL and POST screens */00015000
- /* 10/10/91 M_1.2.2 */00016000
- /* 11/12/91 fix posting */00017000
- /* 11/29/91 M_1.2.2a */00018000
- /* 12/08/91 STKBUGS1/STKBUGS2 from GILMART@lstc2vm.stortek.com */00019000
- /* 12/08/91 remove cursor pfk, force ENTER to do same thing */00020000
- /* 12/08/91 add next group function (previous group PG from cmd line) */00021000
- /* 12/21/91 log/nolog update from COURCOUL@VMTECQRO.QRO.ITESM.MX */00022000
- /* 12/21/91 add ability to dynamically change some user preferences */00023000
- /* 12/29/91 change headers display eliminate date,article number */00024000
- /* 12/29/91 add ability to dynamically change header display */00025000
- /* 12/21/91 *_1.2.2b */00026000
- /* * display 205 message */00027000
- /* * eliminate excess baggage. */00028000
- /* * fix another memory problem. */00029000
- /* * add subject to article display */00030000
- /* * fix article tracking after mail or post */00031000
- /* * use only personal_subscriptions for session (parm "p_s")*/00032000
- /* * update groups on the fly, fix for general case */00033000
- /* * work in conjunction with fx122c7s (nnr 1.5.11 or older) */00034000
- /* * fix problem with multiple receive buffers(rextcpip only)*/00035000
- /* * fix from GILMART@lstc2vm.stortek.com */00036000
- /* 01/28/92 *_1.2.2c */00037000
- /* * fix from GILMART@lstc2vm.stortek.com (sort) */00038000
- /* * fix from GILMART@lstc2vm.stortek.com (mail/post '.') */00039000
- /* * eliminate useless pfks for all_news */00040000
- /* * clean up quit messages */00041000
- /* * add counter for shli and headers screens */00042000
- /* * add novalue routines (for compile) */00043000
- /* * fix newgroups detection and list */00044000
- /* * fix all_news + fix new_news */00045000
- /* * add post as a parameter to nnr */00046000
- /* * switch translate tables (from REXTCPIP, thanks KenH) */00047000
- /* * add multiple server capability */00048000
- /* * fix article map problem */00049000
- /* * fix error detection and control */00050000
- /* 03/31/92 1.2.2d */00051000
- /* * fix from GILMART@lstc2vm.stortek.com (preferences hook) */00052000
- /* * streamline hli processing, simplifies all_news, new_news*/00053000
- /* * breakout hli into individual parts, indexed separately */00054000
- /* * dynamic addition/subtraction to/from pers_subs */00055000
- /* * edit mode s */00056000
- /* * add multiple personal subscriptions */00057000
- /* * fix negative article count (display) */00058000
- /* * only subscribe if article has been read while in headers*/00059000
- /* * fine grain lines/article limit analysis */00060000
- /* * fix from GILMART@lstc2vm.stortek.com ( unmark thread) */00061000
- /* 05/09/92 1.2.2e */00062000
- /*=========================== HISTORY ================================*/00063000
- /** 00064000
- Copyright (C) 1991 Paul J. Campbell 00065000
- 00066000
- This program is free software; you can redistribute it and/or modify00067000
- it under the terms of the MITRE Corporation General Public License a00068000
- published by the MITRE Corporation 00069000
- 00070000
- This program is distributed in the hope that it will be useful, 00071000
- but WITHOUT ANY WARRANTY; without even the implied warranty of 00072000
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00073000
- MITRE General Public License for more details. 00074000
- 00075000
- You should have received a copy of the MITRE General Public License 00076000
- along with this program; if not, write to the MITRE Corporation. 00077000
- **/ 00078000
- signal on novalue 00079000
- Trace('N'); 00080000
- Address XEDIT 00081000
- 'Set ctlchar' '29'x 'escape' 00082000
- 'Set ctlchar @ protect red high' 00083000
- 'Set ctlchar' '4a'x 'protect yellow high' 00084000
- 'Set ctlchar ! protect blue nohigh' 00085000
- 'Set ctlchar $ noprotect turq high' 00086000
- 'Set ctlchar * noprotect white nohigh' 00087000
- 'Set ctlchar & protect pink nohigh' 00088000
- 'Set ctlchar ^ protect green nohigh' 00089000
- 'Extract /lscreen' 00090000
- 'Set msgline on' lscreen.1-3 '2 overlay' 00091000
- 'Set CMDline BOTTOM' 00092000
- 'SET PF04 ONLY dummy' 00093000
- 'SET PF16 ONLY dummy' 00094000
- Address COMMAND 'GLOBALV SELECT VMNNTP' 00095000
- Address COMMAND 'GLOBALV GET VERSION' 00096000
- Address COMMAND 'GLOBALV GET THISNODE' 00097000
- Address COMMAND 'GLOBALV GET NEWSGROUP' 00098000
- Address COMMAND 'GLOBALV GET SOCKET' 00099000
- Address COMMAND 'GLOBALV GET IPADDR' 00100000
- Address COMMAND 'GLOBALV GET YYMMDD' 00101000
- Address COMMAND 'GLOBALV GET NGDATE' 00102000
- Address COMMAND 'GLOBALV GET NEWNEWS' 00103000
- Address COMMAND 'GLOBALV GET POSTONLY' 00104000
- /*-----------------------------------------------------------------*/ 00105000
- /* Driver routine for the main menu screen. */ 00106000
- /*-----------------------------------------------------------------*/ 00107000
- Address COMMAND 'GLOBALV SETL POWER QUIT' 00108000
- Address COMMAND 'GLOBALV SETL XHEADER1 From 20' /*stk*/00109000
- Address COMMAND 'GLOBALV SETL XHEADER2 Subject 99' /*stk*/00110000
- nntprc=RXInital(ipaddr) 00111000
- say nntprc 00112000
- if word(nntprc,1)^='200' & word(nntprc,1)^='201' then 00113000
- do 00114000
- Address COMMAND 'GLOBALV SETL STATUS' nntprc 00115000
- nntprc=RXTermin() 00116000
- Address COMMAND 'DESBUF' 00117000
- 'QUIT' 00118000
- Exit 00119000
- end 00120000
- 00121000
- if postonly then /* we can save ourselves a lot of work */ 00122000
- do 00123000
- if newsgroup^='' then 00124000
- do 00125000
- status=STATUS_Response('GROUP' newsgroup) 00126000
- if word(Status,1)='211' then 00127000
- Call Post$Mail('CMS') 00128000
- else if word(Status,1)='411' then 00129000
- say 'No such news group "'newsgroup'"!' 00130000
- else 00131000
- say Status 00132000
- end 00133000
- else 00134000
- say 'You need to specify a news group!', 00135000
- 'i.e. "NNR news.group (POST"' 00136000
- Call Exit_QQuit 00137000
- end 00138000
- 00139000
- updates.='' 00140000
- update.='' 00141000
- item.='' 00142000
- parse var ipaddr oct1 '.' oct2 '.' oct3 '.' oct4 00143000
- servaddr=right('0'||d2x(oct1),2)||, 00144000
- right('0'||d2x(oct2),2)||, 00145000
- right('0'||d2x(oct3),2)||, 00146000
- right('0'||d2x(oct4),2) 00147000
- Address COMMAND 'SET CMSTYPE HT' 00148000
- Address COMMAND 'EXECIO * DISKR' servaddr 'NNReader A ( STEM UPDATES.' 00149000
- GRrc=rc 00150000
- Address COMMAND 'SET CMSTYPE RT' 00151000
- if GRrc=0 then 00152000
- do 00153000
- Address COMMAND 'FINIS' servaddr 'NNReader A' 00154000
- /* test structure of NNReader file. we will have to do this 00155000
- until everyone has been converted and we know what were 00156000
- dealing with. */ 00157000
- parse var updates.1 teststruct . . '$' . '$*$' . 00158000
- if index(teststruct,'4a'x)>0 then 00159000
- hliflag=1 00160000
- else 00161000
- hliflag=0 00162000
- if hliflag then 00163000
- do 00164000
- parse var updates.1 hli '4a'x updateptr 00165000
- updateptr=word(updateptr,1) 00166000
- end 00167000
- else 00168000
- updateptr=word(updates.1,1) 00169000
- do i=1 to updates.0 00170000
- if hliflag then 00171000
- parse var updates.i hli '4a'x updates.i 00172000
- else 00173000
- hli='' 00174000
- group=word(updates.i,1) 00175000
- if (verify(word(updates.i,2),'0123456789')=0)&, 00176000
- (word(updates.i,2)^='') then 00177000
- do 00178000
- update.group.FrstLstLg=subword(updates.i,2) 00179000
- update.group.HiLvlIndx=hli 00180000
- end 00181000
- else 00182000
- update.group.FrstLstLg=0 00183000
- j=I+1 00184000
- if hliflag then 00185000
- parse var updates.j hli '4a'x nextgroup 00186000
- else 00187000
- nextgroup=updates.j 00188000
- update.group.next=word(nextgroup,1) 00189000
- end 00190000
- end 00191000
- else 00192000
- do 00193000
- updateptr='dummy.first.group' 00194000
- group=updateptr 00195000
- update.group.FrstLstLg='0' 00196000
- Call AddByName('news.announce.newusers') 00197000
- Call AddByName('news.answers') 00198000
- end 00199000
- drop updates. 00200000
- censors.='' 00201000
- censor.='' 00202000
- Address COMMAND 'SET CMSTYPE HT' 00203000
- Address COMMAND 'EXECIO * DISKR Censor Groups * ( STEM CENSORS.' 00204000
- Crc=rc 00205000
- Address COMMAND 'SET CMSTYPE RT' 00206000
- if Crc=0 then 00207000
- do 00208000
- Address COMMAND 'FINIS Censor Groups *' 00209000
- do i=1 to censors.0 00210000
- group=strip(censors.i) 00211000
- censor.group=group 00212000
- end 00213000
- end 00214000
- drop censors. 00215000
- if newsgroup='' then 00216000
- call Main_Menu 00217000
- else if translate(newsgroup)='P_S' then 00218000
- call Personal_Subscriptions 00219000
- else 00220000
- call Single_Group 00221000
- Exit(999) 00222000
- /*-----------------------------------------------------------------*/ 00223000
- /* Add groups to a new nnr user */ 00224000
- /*-----------------------------------------------------------------*/ 00225000
- AddByName:procedure expose update. updateptr 00226000
- parse arg newgroup 00227000
- Address COMMAND 'GLOBALV GET SOCKET' 00228000
- status=STATUS_Response('GROUP' newgroup) 00229000
- if word(Status,1)='211' then 00230000
- do 00231000
- parse var status . . frst_act last_act . 00232000
- if last_act=0 then 00233000
- article_log='1 0$'||compress_log('') 00234000
- else 00235000
- article_log=frst_act*1||' '||last_act*1||'$'||, 00236000
- compress_log(copies('0',max(0,last_act-frst_act+1))) 00237000
- Call Group_Add(newgroup) 00238000
- end 00239000
- Return 00240000
- /*-----------------------------------------------------------------*/ 00241000
- /* Routine Handle signal novalue */ 00242000
- /*-----------------------------------------------------------------*/ 00243000
- NOVALUE: 00244000
- parse source . . myname . 00245000
- say "NOVALUE error in" myname "line" sigl":" 00246000
- say "Source line>" sourceline(sigl) 00247000
- Call Exit_QQuit 00248000
- exit(999) 00249000
- /*-----------------------------------------------------------------*/ 00250000
- /* Routine to drive single SHLI */ 00251000
- /*-----------------------------------------------------------------*/ 00252000
- Personal_Subscriptions: 00253000
- ptr=updateptr 00254000
- gcount=0 00255000
- groups.='' 00256000
- original.='' 00257000
- do while (update.ptr.next^='') 00258000
- if ptr='dummy.first.group' then ptr=update.ptr.next 00259000
- status=STATUS_Response('GROUP' ptr) 00260000
- if word(Status,1)='211' then 00261000
- do 00262000
- parse var status . . frst_act last_act . 00263000
- parse var update.ptr.FrstLstLg frst_rem last_rem '$' log '$*$' .00264000
- gcount=gcount+1 00265000
- item.gcount=ptr last_act frst_rem '? 1' 00266000
- original.ptr=last_act frst_rem '?' 00267000
- end 00268000
- else 00269000
- do 00270000
- if ptr='dummy.first.group' then 00271000
- say status 00272000
- /* Call Group_Delete(ptr) */ 00273000
- end 00274000
- ptr=update.ptr.next 00275000
- end 00276000
- status=STATUS_Response('GROUP' ptr) 00277000
- if word(Status,1)='211' then 00278000
- do 00279000
- parse var status . . frst_act last_act . 00280000
- parse var update.ptr.FrstLstLg frst_rem last_rem '$' log '$*$' . 00281000
- gcount=gcount+1 00282000
- item.gcount=ptr last_act frst_rem '? 1' 00283000
- original.ptr=last_act frst_rem '?' 00284000
- end 00285000
- else 00286000
- do 00287000
- if ptr='dummy.first.group' then 00288000
- say status 00289000
- /* Call Group_Delete(ptr) */ 00290000
- end 00291000
- item.0=gcount 00292000
- Address COMMAND 'GLOBALV SET NEWNEWS 1' 00293000
- Call SortList 00294000
- CHGList.='' 00295000
- Call NNR$SHLI 00296000
- Call save_articles 00297000
- Call Exit_QQuit 00298000
- Return 00299000
- /*-----------------------------------------------------------------*/ 00300000
- /* Routine to drive single Group */ 00301000
- /*-----------------------------------------------------------------*/ 00302000
- Single_Group: 00303000
- article_log=newsgroup||' '||update.newsgroup.FrstLstLg 00304000
- parse var update.newsgroup.FrstLstLg frst_rem last_rem '$' log '$*$' .00305000
- if (frst_rem>=last_rem)&(log='ff'x) then 00306000
- newsflag='1' 00307000
- else 00308000
- newsflag='0' 00309000
- if (censor.newsgroup='') then 00310000
- do 00311000
- Address COMMAND 'GLOBALV GET NUMBER' 00312000
- Address COMMAND 'GLOBALV SET ARTICLE' 00313000
- if (frst_rem=''), 00314000
- |(translate(frst_rem,'.','0')='.'), 00315000
- |^newnews then 00316000
- frst_rem=0 00317000
- nntprc=NEWSXHDR(number frst_rem newsgroup newsflag) 00318000
- end 00319000
- else 00320000
- Do 00321000
- say 'No such news group "'newsgroup'"!' 00322000
- Call Exit_QQuit 00323000
- End 00324000
- if nntprc^=0 then 00325000
- do 00326000
- if word(nntprc,1)='411' then 00327000
- say 'No such news group "'newsgroup'"!' 00328000
- else 00329000
- say nntprc 00330000
- Call Exit_QQuit 00331000
- end 00332000
- Address COMMAND 'GLOBALV SET THREAD 0' 00333000
- Address COMMAND 'GLOBALV SET REDUCE 0' 00334000
- Address COMMAND 'GLOBALV SET REDUCECNT 0' 00335000
- article_log=NNR$XHDR(article_log) 00336000
- if newnews then 00337000
- do 00338000
- if article_log='' then 00339000
- do 00340000
- if last_rem='' then 00341000
- article_log='00 00$'||'ff'x 00342000
- else 00343000
- article_log=last_rem||' '||last_rem||'$'||'ff'x 00344000
- end 00345000
- if update.newsgroup.FrstLstLg='' then 00346000
- Call Group_Add(newsgroup) 00347000
- else 00348000
- update.newsgroup.FrstLstLg=article_log 00349000
- call save_articles 00350000
- end 00351000
- Call Exit_QQuit 00352000
- Return 00353000
- /*-----------------------------------------------------------------*/ 00354000
- /* Routine to drive main menu */ 00355000
- /*-----------------------------------------------------------------*/ 00356000
- Main_Menu: 00357000
- nntprc=NEWSNewG(NGDATE) 00358000
- if word(nntprc,1)='-1' then 00359000
- do 00360000
- Call Exit_QQuit 00361000
- say nntprc 00362000
- end 00363000
- new.='' 00364000
- hli.='' 00365000
- if item.0 > 0 then 00366000
- do 00367000
- hli.0='New_Groups_Since_'yymmdd||' ' 00368000
- HiQual='New_Groups_Since_'yymmdd 00369000
- hli.HiQual='New_Groups_Since_'yymmdd 00370000
- do i=1 to item.0 00371000
- group=strip(item.i) 00372000
- new.group=group 00373000
- end 00374000
- end 00375000
- else 00376000
- hli.0='' 00377000
- nntprc=NEWSList() 00378000
- if word(nntprc,1)^='215' then 00379000
- do 00380000
- say nntprc 00381000
- Call Exit_QQuit 00382000
- end 00383000
- i=0 00384000
- k=0 00385000
- original.='' 00386000
- do l=1 to list.0 00387000
- if index(word(list.l,4),'=')=0 then 00388000
- do 00389000
- groupchk=word(list.l,1) 00390000
- if censor.groupchk='' then 00391000
- do 00392000
- i=i+1 00393000
- item.i=groupchk 00394000
- original.groupchk=subword(list.l,2) 00395000
- if new.groupchk^='' then 00396000
- do 00397000
- k=k+1 00398000
- hli.HiQual.k=groupchk 00399000
- end 00400000
- end 00401000
- end 00402000
- end 00403000
- item.0=i 00404000
- hli.HiQual.0=k 00405000
- drop new. 00406000
- drop censor. 00407000
- drop list. 00408000
- Call SortList 00409000
- /**/ 00410000
- k=0 00411000
- hli.0=hli.0||'Personal_Subscriptions'||' ' 00412000
- HiQual='Personal_Subscriptions' 00413000
- hli.HiQual='Personal_Subscriptions' 00414000
- do i=1 to item.0 00415000
- group=item.i 00416000
- if (update.group.FrstLstLg^=''), 00417000
- &(translate(update.group.FrstLstLg,'.','0')^='.') then 00418000
- do 00419000
- k=k+1 00420000
- hli.HiQual.k=group 00421000
- if update.group.HiLvlIndx^='' then 00422000
- do 00423000
- tempHiQual='Personal_'||update.group.HiLvlIndx 00424000
- if hli.tempHiQual.0='' then 00425000
- do 00426000
- hli.tempHiQual='Personal_'||, 00427000
- update.group.HiLvlIndx||' ' 00428000
- hli.0=hli.0||'Personal_'||, 00429000
- update.group.HiLvlIndx||' ' 00430000
- hli.tempHiQual.0=1 00431000
- end 00432000
- else 00433000
- hli.tempHiQual.0=hli.tempHiQual.0+1 00434000
- ptr=hli.tempHiQual.0 00435000
- hli.tempHiQual.ptr=group 00436000
- end 00437000
- end 00438000
- end 00439000
- hli.HiQual.0=k 00440000
- /**/ 00441000
- k=0 00442000
- parse value item.1 with HiQual . '.' . 00443000
- hli.0=hli.0||HiQual||' ' 00444000
- hli.HiQual=HiQual 00445000
- do i=1 to item.0 00446000
- parse value item.i with NextHiQual . '.' . 00447000
- if NextHiQual^=HiQual then 00448000
- do 00449000
- hli.HiQual.0=k 00450000
- k=0 00451000
- HiQual=NextHiQual 00452000
- hli.HiQual=HiQual 00453000
- hli.0=hli.0||HiQual||' ' 00454000
- end 00455000
- k=k+1 00456000
- hli.HiQual.k=item.i 00457000
- end 00458000
- hli.HiQual.0=k 00459000
- drop item. 00460000
- Address COMMAND 'DESBUF' 00461000
- index=0 00462000
- scrbot=lscreen.1-4 00463000
- row=3;col=2 00464000
- flag = 'PHLI' 00465000
- message = '' 00466000
- Do Forever; 00467000
- Call PHLIscreen; /* display main menu screen */ 00468000
- 'Read Nochange Tag' 00469000
- 'Extract /cursor' 00470000
- row = cursor.1; col = cursor.2; 00471000
- num=0 00472000
- Do While(Queued()>0) 00473000
- num=num+1 00474000
- Parse Pull QueuedLine.num 00475000
- end 00476000
- do i=1 to num 00477000
- Parse var QueuedLine.i key line column string; 00478000
- if key = "RES" Then Nop 00479000
- else SaveQueued=QueuedLine.i 00480000
- end 00481000
- Parse Var SaveQueued key line column string; 00482000
- Select 00483000
- When key = "ETK" Then Call Cursor 00484000
- When key = "CMD" Then Call CommandLine 00485000
- When key = "PFK" Then Call PFKeys 00486000
- otherwise Call AnythingElse 00487000
- End /* select */ 00488000
- End; /* Do Forever */ 00489000
- Return 00490000
- /*-----------------------------------------------------------------*/ 00491000
- /* Routine to sort list */ 00492000
- /* Standard "Shell Sort" (textbook version) */ 00493000
- /*-----------------------------------------------------------------*/ 00494000
- SortList: 00495000
- Procedure Expose Item. 00496000
- Do Gap = 797161 By 0 while Gap>1 00497000
- Gap = Gap%3 00498000
- Do Scan = Gap+1 to item.0 00499000
- Vacant = Scan - Gap 00500000
- If item.Vacant>item.Scan Then Do 00501000
- Temp = item.Scan 00502000
- item.Scan = item.Vacant 00503000
- Do Bubble = Vacant-Gap to 1 By -Gap , 00504000
- While item.Bubble>Temp 00505000
- item.Vacant = item.Bubble 00506000
- Vacant = Bubble 00507000
- End Bubble 00508000
- item.Vacant = Temp 00509000
- End 00510000
- End Scan 00511000
- End Gap 00512000
- Return 00513000
- /*-----------------------------------------------------------------*/ 00514000
- /* Routine to display the main menu screen. */ 00515000
- /*-----------------------------------------------------------------*/ 00516000
- PHLIscreen: /* set each line of the screen */ 00517000
- 'Set Reserved' 1 'noh' '29'x'@ ', 00518000
- center('*** NNR/VM ('||version||') ***',35), 00519000
- right('PHLI/Main',25), 00520000
- '29'x'! ' 00521000
- 'Set Reserved' 2 'noh' '29'x'@ High Level Index' '29'x'!' 00522000
- Do scrpos=3 to lscreen.1-4 00523000
- index=index+1 00524000
- pindex=word(hli.0,index) 00525000
- sindex=word(hli.0,index+(scrbot-2)) 00526000
- tindex=word(hli.0,index+2*(scrbot-2)) 00527000
- 'Set Reserved' scrpos 'noh' '29'x'*'||Left(hli.pindex,25)||'|', 00528000
- '29'x'*'||Left(hli.sindex,25)||'|', 00529000
- '29'x'*'||Left(hli.tindex,25)'29'x'! ' 00530000
- End 00531000
- 'Set Reserved' lscreen.1-3 'noh' 00532000
- 'Set Reserved' lscreen.1-2 'high', 00533000
- ' 1= Help ', 00534000
- ||'2= All_News ', 00535000
- ||'3= Quit ', 00536000
- ||' 4= New_News ', 00537000
- ||' 5= ', 00538000
- ||' 6= ' 00539000
- 'Set Reserved' lscreen.1-1 'high', 00540000
- ' 7= Backward ', 00541000
- ||'8= Forward ', 00542000
- ||'9= ', 00543000
- ||'10= ', 00544000
- ||'11= ', 00545000
- ||'12= ' 00546000
- If message ^= "" Then 00547000
- Do; 00548000
- 'EMSG' message 00549000
- message = ''; 00550000
- End; 00551000
- 'Cursor screen' row col 00552000
- Return 00553000
- /*-----------------------------------------------------------------*/ 00554000
- /* update linked list for the articles read */ 00555000
- /*-----------------------------------------------------------------*/ 00556000
- Group_Add: procedure expose update. updateptr article_log 00557000
- parse arg group 00558000
- ptr=updateptr 00559000
- do while (update.ptr.next^='') 00560000
- ptr=update.ptr.next 00561000
- end 00562000
- update.ptr.next=group 00563000
- update.group.FrstLstLg=article_log 00564000
- update.group.next='' 00565000
- return 00566000
- /*-----------------------------------------------------------------*/ 00567000
- /* update linked list for the articles read */ 00568000
- /*-----------------------------------------------------------------*/ 00569000
- Group_Delete: procedure expose update. updateptr 00570000
- parse arg group 00571000
- ptr=updateptr 00572000
- if ptr=group then 00573000
- do 00574000
- updateptr=update.ptr.next 00575000
- update.group.FrstLstLg='' 00576000
- update.group.HiLvlIndx='' 00577000
- update.group.next='' 00578000
- return 00579000
- end 00580000
- do while (ptr^=group&ptr^='') 00581000
- prevptr=ptr 00582000
- ptr=update.ptr.next 00583000
- end 00584000
- if ptr='' then 00585000
- do 00586000
- say 'update delete logic problem' 00587000
- return 00588000
- end 00589000
- update.prevptr.next=update.ptr.next 00590000
- update.group.FrstLstLg='' 00591000
- update.group.next='' 00592000
- return 00593000
- /*-----------------------------------------------------------------*/ 00594000
- /* update linked list for the articles read */ 00595000
- /*-----------------------------------------------------------------*/ 00596000
- save_articles: 00597000
- group=updateptr 00598000
- if group='' then return 00599000
- do while (update.group.next^='') 00600000
- tempstr=update.group.HiLvlIndx||'4a'x||group||' '||, 00601000
- update.group.FrstLstLg 00602000
- Address COMMAND 'EXECIO 1 DISKW Groups New A 0 V 2048 (VAR TEMPSTR' 00603000
- if rc^=0 then 00604000
- do 00605000
- Address COMMAND 'GLOBALV SET DISKFULL YES' 00606000
- return 00607000
- end 00608000
- group=update.group.next 00609000
- end 00610000
- tempstr=update.group.HiLvlIndx||'4a'x||group||' '||, 00611000
- update.group.FrstLstLg 00612000
- Address COMMAND 'EXECIO 1 DISKW Groups New A 0 V 2048 (VAR TEMPSTR' 00613000
- if rc^=0 then 00614000
- Address COMMAND 'GLOBALV SET DISKFULL YES' 00615000
- Address COMMAND 'FINIS Groups New A' 00616000
- return 00617000
- /*-----------------------------------------------------------------*/ 00618000
- /* Routine to pick off the command line. */ 00619000
- /*-----------------------------------------------------------------*/ 00620000
- CommandLine: 00621000
- line=translate(line); 00622000
- If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then 00623000
- Do; 00624000
- Address COMMAND 'DESBUF' 00625000
- Call Exit_Quit 00626000
- End; 00627000
- else If (line = 'SUBSET') Then 00628000
- Call Subset 00629000
- else 00630000
- Do 00631000
- message = 'Unsupported command:' line column string; 00632000
- index=index-(scrbot-2) 00633000
- End 00634000
- Return 00635000
- /*-----------------------------------------------------------------*/ 00636000
- /* Routine to handle the PFKs key. */ 00637000
- /*-----------------------------------------------------------------*/ 00638000
- PFKeys: 00639000
- Call PFKmap 00640000
- If Line=1 then 00641000
- do 00642000
- Call NNR$HELP(0) 00643000
- index=index-(scrbot-2) 00644000
- end 00645000
- else If Line=2 then Call All_News 00646000
- else If Line=3 then call Exit_Quit 00647000
- else If Line=4 then call New_News 00648000
- else If Line=7 then call PHLI_Backward 00649000
- else If Line=8 then call PHLI_Forward 00650000
- else Call UnsupportedPFK 00651000
- Return 00652000
- /*-----------------------------------------------------------------*/ 00653000
- /* Routine to handle PFK Backward. */ 00654000
- /*-----------------------------------------------------------------*/ 00655000
- PHLI_Backward: 00656000
- row=3;col=2; 00657000
- if index-4*(scrbot-2) > 1 then 00658000
- index=index-4*(scrbot-2) 00659000
- else 00660000
- Do 00661000
- message='Reached Top of File' 00662000
- index=0 00663000
- End 00664000
- Return 00665000
- /*-----------------------------------------------------------------*/ 00666000
- /* Routine to handle PFK Forward. */ 00667000
- /*-----------------------------------------------------------------*/ 00668000
- PHLI_Forward: 00669000
- row=3;col=2; 00670000
- If index+3*(scrbot-2) < words(hli.0)+scrbot-2 then 00671000
- index=index+2*(scrbot-2) 00672000
- else 00673000
- Do 00674000
- message='Reached End of File' 00675000
- index=index-(scrbot-2) 00676000
- End 00677000
- Return 00678000
- /*-----------------------------------------------------------------*/ 00679000
- /* Routine to handle PFK Cursor. */ 00680000
- /*-----------------------------------------------------------------*/ 00681000
- Cursor: 00682000
- 'CURSOR HOME' 00683000
- 'EXTRACT /CURSOR/' 00684000
- row=cursor.1 00685000
- col=cursor.2 00686000
- index=index-(scrbot-2) 00687000
- Return 00688000
- /*-----------------------------------------------------------------*/ 00689000
- /* Routine to handle anything else. */ 00690000
- /*-----------------------------------------------------------------*/ 00691000
- AnythingElse: 00692000
- index=index-(scrbot-2) 00693000
- Return 00694000
- /*-----------------------------------------------------------------*/ 00695000
- /* Routine to handle PFK Mapping. */ 00696000
- /*-----------------------------------------------------------------*/ 00697000
- PFKmap: 00698000
- if line>12 then line=line-12 00699000
- Return 00700000
- /*-----------------------------------------------------------------*/ 00701000
- /* Routine to handle PFK All_News. */ 00702000
- /*-----------------------------------------------------------------*/ 00703000
- All_News: 00704000
- if row>2&row<=scrbot then 00705000
- do 00706000
- if col<27 then ptr=index-scrbot+row 00707000
- else if col<53 then ptr=index+(scrbot-2)-scrbot+row 00708000
- else ptr=index+2*(scrbot-2)-scrbot+row 00709000
- if ptr>words(hli.0) then 00710000
- message='Cursor not on high level index!' 00711000
- else 00712000
- do 00713000
- Address COMMAND 'DESBUF' 00714000
- item.='' 00715000
- ptr=word(hli.0,ptr) 00716000
- do i=1 to hli.ptr.0 00717000
- group=hli.ptr.i 00718000
- item.i=group original.group 0 00719000
- end 00720000
- item.0=hli.ptr.0 00721000
- Address COMMAND 'GLOBALV SET NEWNEWS 0' 00722000
- Call NNR$SHLI 00723000
- Drop item. 00724000
- end 00725000
- end 00726000
- else 00727000
- message='Cursor not on high level index!' 00728000
- index=index-(scrbot-2) 00729000
- Return 00730000
- /*-----------------------------------------------------------------*/ 00731000
- /* Routine to handle SUBSET command. */ 00732000
- /*-----------------------------------------------------------------*/ 00733000
- Subset: 00734000
- 'CMS' 00735000
- index=index-(scrbot-2) 00736000
- Return 00737000
- /*-----------------------------------------------------------------*/ 00738000
- /* Routine to handle PFK Quit. */ 00739000
- /*-----------------------------------------------------------------*/ 00740000
- Exit_Quit: 00741000
- Address COMMAND 'GLOBALV GET SOCKET' 00742000
- call save_articles 00743000
- nntprc=NEWSQuit() 00744000
- say nntprc 00745000
- if word(nntprc,1)='205' then 00746000
- Address COMMAND 'GLOBALV SETL STATUS' 0 00747000
- else 00748000
- Address COMMAND 'GLOBALV SETL STATUS' 1 00749000
- nntprc=RXTermin() 00750000
- Address COMMAND 'DESBUF' 00751000
- 'QUIT' 00752000
- Exit; 00753000
- Return 00754000
- /*-----------------------------------------------------------------*/ 00755000
- /* Routine to handle PFK Quit/no article save */ 00756000
- /*-----------------------------------------------------------------*/ 00757000
- Exit_QQuit: 00758000
- Address COMMAND 'GLOBALV GET SOCKET' 00759000
- nntprc=NEWSQuit() 00760000
- say nntprc 00761000
- if word(nntprc,1)='205' then 00762000
- Address COMMAND 'GLOBALV SETL STATUS' 0 00763000
- else 00764000
- Address COMMAND 'GLOBALV SETL STATUS' 1 00765000
- nntprc=RXTermin() 00766000
- Address COMMAND 'DESBUF' 00767000
- 'QUIT' 00768000
- Exit; 00769000
- Return 00770000
- /*-----------------------------------------------------------------*/ 00771000
- /* Routine to handle PFK New_News. */ 00772000
- /*-----------------------------------------------------------------*/ 00773000
- New_News: 00774000
- if row>2&row<=scrbot then 00775000
- do 00776000
- if col<27 then ptr=index-scrbot+row 00777000
- else if col<53 then ptr=index+(scrbot-2)-scrbot+row 00778000
- else ptr=index+2*(scrbot-2)-scrbot+row 00779000
- if ptr>words(hli.0) then 00780000
- message='Cursor not on high level index!' 00781000
- else 00782000
- do 00783000
- Address COMMAND 'DESBUF' 00784000
- Address COMMAND 'GLOBALV SET NEWNEWS 1' 00785000
- item.='' 00786000
- ptr=word(hli.0,ptr) 00787000
- do i=1 to hli.ptr.0 00788000
- group=hli.ptr.i 00789000
- frst_rem=word(update.group.FrstLstLg,1) 00790000
- if (frst_rem^='') then 00791000
- do 00792000
- item.i=group, 00793000
- word(original.group,1), 00794000
- frst_rem, 00795000
- word(original.group,3), 00796000
- 1 00797000
- end 00798000
- else 00799000
- do 00800000
- item.i=group original.group 0 00801000
- end 00802000
- end 00803000
- item.0=hli.ptr.0 00804000
- CHGList.='' 00805000
- Call NNR$SHLI 00806000
- Drop item. 00807000
- if CHGList.0 then 00808000
- Call Update_hli(ptr) 00809000
- Drop CHGList. 00810000
- end 00811000
- end 00812000
- else 00813000
- message='Cursor not on high level index!' 00814000
- index=index-(scrbot-2) 00815000
- Return 00816000
- /*-----------------------------------------------------------------*/ 00817000
- /* Routine to adjust Personal_... */ 00818000
- /*-----------------------------------------------------------------*/ 00819000
- Update_Hli:procedure expose hli. CHGList. updateptr update. 00820000
- parse arg ptr 00821000
- /* the deletes will take care of themselves */ 00822000
- HiQual='Personal_Subscriptions' 00823000
- NewHiQ='Personal_Subscriptions ' 00824000
- BldHiQ='' 00825000
- do i=1 to words(hli.0) 00826000
- testHiQual=word(hli.0,i) 00827000
- if index(testHiQual,'Personal_')>0 then 00828000
- do 00829000
- if testHiQual=HiQual then 00830000
- iterate 00831000
- else 00832000
- hli.testHiQual.0='' 00833000
- end 00834000
- else 00835000
- BldHiQ=BldHiQ||word(hli.0,i)||' ' 00836000
- end 00837000
- k=0 00838000
- do i=1 to hli.HiQual.0 00839000
- group=hli.HiQual.i 00840000
- if (update.group.FrstLstLg^=''), 00841000
- &(translate(update.group.FrstLstLg,'.','0')^='.') then 00842000
- do 00843000
- k=k+1 00844000
- hli.HiQual.k=group 00845000
- if update.group.HiLvlIndx^='' then 00846000
- do 00847000
- tempHiQual='Personal_'||update.group.HiLvlIndx 00848000
- if hli.tempHiQual.0='' then 00849000
- do 00850000
- hli.tempHiQual='Personal_'||, 00851000
- update.group.HiLvlIndx||' ' 00852000
- NewHiQ=NewHiQ||'Personal_'||, 00853000
- update.group.HiLvlIndx||' ' 00854000
- hli.tempHiQual.0=1 00855000
- end 00856000
- else 00857000
- hli.tempHiQual.0=hli.tempHiQual.0+1 00858000
- tptr=hli.tempHiQual.0 00859000
- hli.tempHiQual.tptr=group 00860000
- end 00861000
- end 00862000
- end 00863000
- hli.HiQual.0=k 00864000
- /* add new subscriptions to the end of the list */ 00865000
- if hli.ptr.0 <> '' then 00866000
- do 00867000
- do i=1 to hli.ptr.0 00868000
- group=hli.ptr.i 00869000
- if CHGList.group='Add' then 00870000
- do 00871000
- k=k+1 00872000
- hli.HiQual.k=group 00873000
- if update.group.HiLvlIndx^='' then 00874000
- do 00875000
- tempHiQual='Personal_'||update.group.HiLvlIndx 00876000
- if hli.tempHiQual.0='' then 00877000
- do 00878000
- hli.tempHiQual='Personal_'||, 00879000
- update.group.HiLvlIndx||' ' 00880000
- NewHiQ=NewHiQ||'Personal_'||, 00881000
- update.group.HiLvlIndx||' ' 00882000
- hli.tempHiQual.0=1 00883000
- end 00884000
- else 00885000
- hli.tempHiQual.0=hli.tempHiQual.0+1 00886000
- tptr=hli.tempHiQual.0 00887000
- hli.tempHiQual.tptr=group 00888000
- end 00889000
- end 00890000
- end 00891000
- hli.HiQual.0=k 00892000
- end 00893000
- if index(word(BldHiQ,1),'New_Groups_Since_')>0 then 00894000
- hli.0=word(BldHiQ,1)||' '||strip(NewHiQ)||' '||subword(bldHiQ,2) 00895000
- else 00896000
- hli.0=strip(NewHiQ)||' '||bldHiQ 00897000
- Return 00898000
- /*-----------------------------------------------------------------*/ 00899000
- /* Routine to handle Unsupported PFK */ 00900000
- /*-----------------------------------------------------------------*/ 00901000
- UnsupportedPFK: 00902000
- index=index-(scrbot-2) 00903000
- message='Unsupported PFK' 00904000
- Return 00905000
- /**---------------------------------------------------------------**/ 00906000
- /** Network News Reader **/ 00907000
- /** Secondary High Level Index **/ 00908000
- /**---------------------------------------------------------------**/ 00909000
- nnr$shli: procedure expose item. update. updateptr original. CHGList. 00910000
- 'Extract /lscreen' 00911000
- Address COMMAND 'GLOBALV SELECT VMNNTP' 00912000
- Address COMMAND 'GLOBALV GET VERSION' 00913000
- Address COMMAND 'GLOBALV GET NEWNEWS' 00914000
- Address COMMAND 'GLOBALV GET SOCKET' 00915000
- Address COMMAND 'GLOBALV GET POWER' 00916000
- Address COMMAND 'GLOBALV GET IPADDR' 00917000
- newcheck.='0' 00918000
- scrbot=lscreen.1-4 00919000
- CHGlist.0='0' 00920000
- do i=1 to item.0 00921000
- first.i=word(item.i,3) 00922000
- last.i=word(item.i,2) 00923000
- newcheck.i=word(item.i,5) 00924000
- groupname.i=word(item.i,1) 00925000
- if newcheck.i then 00926000
- do 00927000
- group=groupname.i 00928000
- parse var update.group.FrstLstLg frst_rem last_rem '$' . 00929000
- if (verify(last_rem,'0123456789$')=0), 00930000
- &(last_rem^='') then 00931000
- num.i=count_log(update.group.FrstLstLg)+(last.i-last_rem) 00932000
- else 00933000
- num.i=last.i-first.i 00934000
- end 00935000
- else 00936000
- num.i=last.i-first.i + 1 00937000
- if num.i<0 | first.i=0 | last.i=0 then 00938000
- num.i=0 00939000
- item.i=left(word(item.i,1),28)||right(num.i,6)||, 00940000
- right(word(item.i,4),3) 00941000
- end 00942000
- index=0 00943000
- row=3;col=2; 00944000
- message = ''; 00945000
- flag='SHLI' 00946000
- Address COMMAND 'DESBUF' 00947000
- Do Forever; 00948000
- Call SHLIscreen; /* display main menu screen */ 00949000
- 'Read Nochange Tag' 00950000
- 'Extract /cursor' 00951000
- row = cursor.1; col = cursor.2; 00952000
- num=0 00953000
- Do While(Queued()>0) 00954000
- num=num+1 00955000
- Parse Pull QueuedLine.num 00956000
- end 00957000
- do i=1 to num 00958000
- Parse var QueuedLine.i key line column string; 00959000
- if key = "RES" Then Nop 00960000
- else SaveQueued=QueuedLine.i 00961000
- end 00962000
- Parse Var SaveQueued key line column string; 00963000
- Select 00964000
- When key = "ETK" Then Call Cursor 00965000
- When key = "CMD" Then Call SHLI_CommandLine 00966000
- When key = "PFK" Then Call SHLI_PFKeys 00967000
- otherwise Call AnythingElse 00968000
- End /* select */ 00969000
- If flag = 'QUIT' Then 00970000
- Leave; 00971000
- End /* Do Forever */ 00972000
- 00973000
- Return 00974000
- 00975000
- 00976000
- /*-----------------------------------------------------------------*/ 00977000
- /* Routine to display the main menu screen. */ 00978000
- /*-----------------------------------------------------------------*/ 00979000
- SHLIscreen: /* set each line of the screen */ 00980000
- 'Set Reserved' 1 'noh' '29'x'@ ', 00981000
- center('*** NNR/VM ('||version||') ***',35), 00982000
- right('SHLI/Groups',25), 00983000
- '29'x'!' 00984000
- if power='QUIT' then 00985000
- 'Set Reserved' 2 'noh' '29'x'@'||, 00986000
- 'Power OFF(Groups='||index+1||'/'||item.0||')'||'29'x'!' 00987000
- else 00988000
- 'Set Reserved' 2 'noh' '29'x'@'||, 00989000
- 'Power ON(Groups='||item.0||')'||'29'x'!' 00990000
- Do scrpos=3 to lscreen.1-4 00991000
- index=index+1 00992000
- sindex=index+(scrbot-2) 00993000
- if newcheck.index then 00994000
- attrib='29'x'$' 00995000
- else 00996000
- attrib='29'x'*' 00997000
- if newcheck.sindex then 00998000
- sattrib='29'x'$' 00999000
- else 01000000
- sattrib='29'x'*' 01001000
- 'Set Reserved' scrpos 'noh' attrib||, 01002000
- Left(item.index,37)||, 01003000
- '29'x'^'||'|'||sattrib||, 01004000
- Left(item.sindex,37)||, 01005000
- '29'x'!' 01006000
- End 01007000
- 'Set Reserved' lscreen.1-3 'noh' 01008000
- if newnews then 01009000
- do 01010000
- 'Set Reserved' lscreen.1-2 'high', 01011000
- ' 1= Help ', 01012000
- ||'2= Articles ', 01013000
- ||'3= Quit ', 01014000
- ||' 4= Headers ', 01015000
- ||' 5= Post ', 01016000
- ||' 6= Mark ' 01017000
- 'Set Reserved' lscreen.1-1 'high', 01018000
- ' 7= Backward ', 01019000
- ||'8= Forward ', 01020000
- ||'9= Sub/UnS ', 01021000
- ||'10= UpDtGrp ', 01022000
- ||'11= U_Prefer ', 01023000
- ||'12= Power ' 01024000
- end 01025000
- else 01026000
- do 01027000
- 'Set Reserved' lscreen.1-2 'high', 01028000
- ' 1= Help ', 01029000
- ||'2= Articles ', 01030000
- ||'3= Quit ', 01031000
- ||' 4= Headers ', 01032000
- ||' 5= Post ', 01033000
- ||' 6= ' 01034000
- 'Set Reserved' lscreen.1-1 'high', 01035000
- ' 7= Backward ', 01036000
- ||'8= Forward ', 01037000
- ||'9= ', 01038000
- ||'10= UpDtGrp ', 01039000
- ||'11= U_Prefer ', 01040000
- ||'12= Power ' 01041000
- end 01042000
- If message ^= "" Then 01043000
- Do; 01044000
- 'EMSG' message 01045000
- message = ''; 01046000
- End; 01047000
- 'Cursor screen' row col 01048000
- Return; 01049000
- /*-----------------------------------------------------------------*/ 01050000
- /* Routine to pick off the command line. */ 01051000
- /*-----------------------------------------------------------------*/ 01052000
- SHLI_CommandLine: 01053000
- line=translate(line); 01054000
- If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then 01055000
- Do; 01056000
- Address COMMAND 'DESBUF' 01057000
- flag='QUIT' /* exit program */ 01058000
- End; 01059000
- else If (line = 'SUBSET') Then 01060000
- Call Subset 01061000
- else If (line = 'UPDATE') Then 01062000
- Call SHLI_Update 01063000
- else 01064000
- do 01065000
- message = 'Unsupported command:' line column string; 01066000
- index=index-(scrbot-2) 01067000
- end 01068000
- Return 01069000
- /*-----------------------------------------------------------------*/ 01070000
- /* Routine to mark a group of articles as being read */ 01071000
- /*-----------------------------------------------------------------*/ 01072000
- SHLI_Mark: 01073000
- if (row <= 2 | row > scrbot) then 01074000
- message='Cursor outside of area' 01075000
- else 01076000
- do 01077000
- if col<40 then ptr=index-scrbot+row 01078000
- else ptr=sindex-scrbot+row 01079000
- if ptr>item.0 then 01080000
- message='Cursor outside of area' 01081000
- else 01082000
- do 01083000
- if num.ptr=0 then 01084000
- do 01085000
- message=groupname.ptr||' is already at zero!' 01086000
- index=index-(scrbot-2) 01087000
- Return 01088000
- end 01089000
- newcheck.ptr='1' 01090000
- article_log=last.ptr*1||' '||last.ptr*1||'$'||, 01091000
- compress_log('') 01092000
- chkgroup=groupname.ptr 01093000
- if update.chkgroup.FrstLstLg='' then 01094000
- do 01095000
- Call Group_Add(chkgroup) 01096000
- CHGlist.0='1' 01097000
- if CHGlist.chkgroup='Delete' then 01098000
- CHGList.chkgroup='' 01099000
- else 01100000
- CHGlist.chkgroup='Add' 01101000
- end 01102000
- else 01103000
- update.chkgroup.FrstLstLg=article_log 01104000
- first.ptr=word(update.chkgroup.FrstLstLg,1) 01105000
- num.ptr=0 01106000
- item.ptr=substr(item.ptr,1,28)||, 01107000
- right(num.ptr,6)||'*'||substr(item.ptr,36,2) 01108000
- message=groupname.ptr||' MARKed as read!' 01109000
- end 01110000
- end 01111000
- index=index-(scrbot-2) 01112000
- Return 01113000
- /*-----------------------------------------------------------------*/ 01114000
- /* Routine to Reconnect to server. */ 01115000
- /*-----------------------------------------------------------------*/ 01116000
- SHLI_ReConnect: 01117000
- nntprc=NEWSQuit() 01118000
- nntprc=RXTermin() 01119000
- nntprc=RXInital(ipaddr) 01120000
- if word(nntprc,1)^='200' & word(nntprc,1)^='201' then 01121000
- do 01122000
- Address COMMAND 'GLOBALV SETL STATUS' nntprc 01123000
- Call Exit_QQuit 01124000
- end 01125000
- Address COMMAND 'GLOBALV GET SOCKET' 01126000
- Return 01127000
- /*-----------------------------------------------------------------*/ 01128000
- /* Routine to update a group in place */ 01129000
- /*-----------------------------------------------------------------*/ 01130000
- SHLI_Update: 01131000
- Call SHLI_ReConnect 01132000
- message='Some/All Group', 01133000
- 'entrys contain updated information!' 01134000
- do ptr=1 to item.0 01135000
- if newnews&newcheck.ptr then 01136000
- do 01137000
- chkgroup=groupname.ptr 01138000
- status=STATUS_Response('GROUP' chkgroup) 01139000
- if word(Status,1)='211' then 01140000
- do 01141000
- parse var update.chkgroup.FrstLstLg frst_rem, 01142000
- last_rem '$' log '$*$' . 01143000
- parse var status . . frst_act last_act . 01144000
- ext_log='' 01145000
- log=adjust_outlog(adjust_inlog(expand_log(log))) 01146000
- article_log=frst_rem||' '||last_rem||'$'||, 01147000
- compress_log(log) 01148000
- update.chkgroup.FrstLstLg=article_log 01149000
- first.ptr=frst_rem 01150000
- last.ptr=last_act 01151000
- num.ptr=count_log(article_log)+(last.ptr-last_rem) 01152000
- if (num.ptr<0) then 01153000
- num.ptr=0 01154000
- item.ptr=substr(item.ptr,1,28)||, 01155000
- right(num.ptr,6)||' '||substr(item.ptr,36,2) 01156000
- original.chkgroup=last_act frst_act, 01157000
- word(original.chkgroup,3) 01158000
- end 01159000
- end 01160000
- else 01161000
- do 01162000
- status=STATUS_Response('GROUP' groupname.ptr) 01163000
- if word(Status,1)='211' then 01164000
- do 01165000
- parse var status . . frst_act last_act . 01166000
- first.ptr=frst_act 01167000
- last.ptr=last_act 01168000
- original.chkgroup=last_act frst_act, 01169000
- word(original.chkgroup,3) 01170000
- end 01171000
- num.ptr=last.ptr-first.ptr+1 01172000
- if num.ptr<0 | first.ptr=0 | last.ptr=0 then 01173000
- num.ptr=0 01174000
- item.ptr=substr(item.ptr,1,28)||, 01175000
- right(num.ptr,6)||' '||substr(item.ptr,36,2) 01176000
- end 01177000
- end 01178000
- index=index-(scrbot-2) 01179000
- Return 01180000
- /*-----------------------------------------------------------------*/ 01181000
- /* Routine to update a group in place */ 01182000
- /*-----------------------------------------------------------------*/ 01183000
- SHLI_UpdtGrp: 01184000
- if (row <= 2 | row > scrbot) then 01185000
- message='Cursor outside of area' 01186000
- else 01187000
- do 01188000
- if col<40 then ptr=index-scrbot+row 01189000
- else ptr=sindex-scrbot+row 01190000
- if ptr>item.0 then 01191000
- message='Cursor outside of area' 01192000
- else 01193000
- do 01194000
- Call SHLI_ReConnect 01195000
- message=groupname.ptr 'NOT updated!' 01196000
- if newnews&newcheck.ptr then 01197000
- do 01198000
- chkgroup=groupname.ptr 01199000
- status=STATUS_Response('GROUP' chkgroup) 01200000
- if word(Status,1)='211' then 01201000
- do 01202000
- parse var update.chkgroup.FrstLstLg frst_rem, 01203000
- last_rem '$' log '$*$' . 01204000
- parse var status . . frst_act last_act . 01205000
- ext_log='' 01206000
- log=adjust_outlog(adjust_inlog(expand_log(log))) 01207000
- article_log=frst_rem||' '||last_rem||'$'||, 01208000
- compress_log(log) 01209000
- update.chkgroup.FrstLstLg=article_log 01210000
- first.ptr=frst_rem 01211000
- last.ptr=last_act 01212000
- num.ptr=count_log(article_log)+(last.ptr-last_rem) 01213000
- if num.ptr<0 | first.ptr=0 | last.ptr=0 then 01214000
- num.ptr=0 01215000
- item.ptr=substr(item.ptr,1,28)||, 01216000
- right(num.ptr,6)||' '||substr(item.ptr,36,2) 01217000
- message=groupname.ptr 'updated!' 01218000
- original.chkgroup=last_act frst_act, 01219000
- word(original.chkgroup,3) 01220000
- end 01221000
- end 01222000
- else 01223000
- do 01224000
- status=STATUS_Response('GROUP' groupname.ptr) 01225000
- if word(Status,1)='211' then 01226000
- do 01227000
- parse var status . . frst_act last_act . 01228000
- first.ptr=frst_act 01229000
- last.ptr=last_act 01230000
- original.chkgroup=last_act frst_act, 01231000
- word(original.chkgroup,3) 01232000
- end 01233000
- num.ptr=last.ptr-first.ptr + 1 01234000
- if num.ptr<0 | first.ptr=0 | last.ptr=0 then 01235000
- num.ptr=0 01236000
- item.ptr=substr(item.ptr,1,28)||, 01237000
- right(num.ptr,6)||' '||substr(item.ptr,36,2) 01238000
- message=groupname.ptr 'updated!' 01239000
- end 01240000
- end 01241000
- end 01242000
- index=index-(scrbot-2) 01243000
- Return 01244000
- /*-----------------------------------------------------------------*/ 01245000
- /* Routine to handle the PFKs key. */ 01246000
- /*-----------------------------------------------------------------*/ 01247000
- SHLI_PFKeys: 01248000
- Call PFKmap 01249000
- If Line=1 then 01250000
- do 01251000
- Call NNR$HELP(1) 01252000
- index=index-(scrbot-2) 01253000
- end 01254000
- else If Line=2 then Call Articles 01255000
- else If Line=3 then call Return_Quit 01256000
- else If Line=4 then call Headers 01257000
- else If Line=5 then call SHLI_Post 01258000
- else If Line=6 & newnews then Call SHLI_Mark 01259000
- else If Line=7 then call SHLI_Backward 01260000
- else If Line=8 then call SHLI_Forward 01261000
- else If Line=9 & newnews then Call SubUnsub 01262000
- else If Line=10 then Call SHLI_UpdtGrp 01263000
- else If Line=11 then 01264000
- do 01265000
- Address COMMAND 'XEDIT USER PREFS S (PROFILE NNR$PREF' 01266000
- index=index-(scrbot-2) 01267000
- end 01268000
- else If Line=12 then Call PowerRead('TOGGLE') 01269000
- else Call UnsupportedPFK 01270000
- Return 01271000
- /*-----------------------------------------------------------------*/ 01272000
- /* Routine to handle PFK Article. */ 01273000
- /*-----------------------------------------------------------------*/ 01274000
- Articles: 01275000
- Call PowerRead('SET') 01276000
- MoreGroups='FIRST' 01277000
- if (row <= 2 | row > scrbot) then 01278000
- message='Cursor outside of area' 01279000
- else 01280000
- do 01281000
- if col<40 then ptr=index-scrbot+row 01282000
- else ptr=sindex-scrbot+row 01283000
- if ptr>item.0 then 01284000
- message='Cursor outside of area' 01285000
- else 01286000
- do 01287000
- do while(MoreGroups='NEXT', 01288000
- |MoreGroups='PREV', 01289000
- |MoreGroups='FIRST') 01290000
- if num.ptr=0 & MoreGroups='FIRST' then 01291000
- do 01292000
- index=index-(scrbot-2) 01293000
- Return 01294000
- end 01295000
- posting=1 01296000
- newsflag='0' 01297000
- log='' 01298000
- if newnews then 01299000
- do 01300000
- startnum=first.ptr 01301000
- if newcheck.ptr then 01302000
- do 01303000
- chkgroup=groupname.ptr 01304000
- parse var update.chkgroup.FrstLstLg frst_rem, 01305000
- last_rem '$' log '$*$' . 01306000
- if (frst_rem>=last_rem)&(log='ff'x) then 01307000
- newsflag='1' 01308000
- end 01309000
- else 01310000
- do 01311000
- newcheck.ptr='1' 01312000
- chkgroup=groupname.ptr 01313000
- frst_rem=first.ptr 01314000
- last_rem=last.ptr 01315000
- end 01316000
- end 01317000
- else 01318000
- startnum=0 01319000
- startnum=startnum*1 01320000
- Address COMMAND 'GLOBALV SET ARTICLE' startnum 01321000
- Address COMMAND 'GLOBALV SET FRST_ACT' 01322000
- Address COMMAND 'GLOBALV SET LAST_ACT' 01323000
- Address COMMAND 'GLOBALV SET NEXT_ACT' 01324000
- do while(posting) 01325000
- Address COMMAND 'GLOBALV GET HEADERS' 01326000
- Address COMMAND 'GLOBALV SET POSTING 0' 01327000
- Address COMMAND 'GLOBALV GET ARTICLE' 01328000
- nntprc=NEWSArti(headers groupname.ptr article newsflag) 01329000
- if nntprc^=0 then 01330000
- do 01331000
- message='Return from server('||nntprc||')!' 01332000
- index=index-(scrbot-2) 01333000
- Return 01334000
- end 01335000
- Address COMMAND 'GLOBALV GET POSTING' 01336000
- if posting then newsflag='0' 01337000
- if posting then 01338000
- Call POST$MAIL('ARTI') 01339000
- End /* While posting */ 01340000
- Address COMMAND 'GLOBALV GET ARTICLE' 01341000
- Address COMMAND 'GLOBALV GET LAST_ACT' 01342000
- Address COMMAND 'GLOBALV GET FRST_ACT' 01343000
- Address COMMAND 'GLOBALV GET NEXT_ACT' 01344000
- if next_act^='' then article=next_act 01345000
- if article='' then article=frst_act 01346000
- frst_act=article 01347000
- first.ptr=article 01348000
- if last_act=0 then 01349000
- do 01350000
- article_log='1 0$'||compress_log('') 01351000
- first.ptr=1 01352000
- last.ptr=0 01353000
- num.ptr=0 01354000
- item.ptr=substr(item.ptr,1,28)||, 01355000
- right(num.ptr,6)||'*'||substr(item.ptr,36,2) 01356000
- end 01357000
- else if newnews then 01358000
- do 01359000
- if last_act='' then 01360000
- last_act=last_rem 01361000
- if log^='' then 01362000
- log=expand_log(log) 01363000
- log=adjust_inlog(log) 01364000
- ext_log='' 01365000
- log=adjust_outlog(log) 01366000
- if next_act='' then 01367000
- do 01368000
- article_log=last_act||' '||last_act||'$'||, 01369000
- compress_log('') 01370000
- first.ptr=last_act 01371000
- end 01372000
- else 01373000
- do 01374000
- article_log=frst_rem||' '||last_rem||'$'||, 01375000
- compress_log(log) 01376000
- first.ptr=frst_rem 01377000
- end 01378000
- if update.chkgroup.FrstLstLg='' then 01379000
- do 01380000
- Call Group_Add(chkgroup) 01381000
- CHGlist.0='1' 01382000
- if CHGlist.chkgroup='Delete' then 01383000
- CHGList.chkgroup='' 01384000
- else 01385000
- CHGlist.chkgroup='Add' 01386000
- end 01387000
- else 01388000
- update.chkgroup.FrstLstLg=article_log 01389000
- num.ptr=count_log(article_log)+(last.ptr-last_rem) 01390000
- if num.ptr<0 | first.ptr=0 | last.ptr=0 then 01391000
- num.ptr=0 01392000
- end 01393000
- item.ptr=substr(item.ptr,1,28)||, 01394000
- right(num.ptr,6)||'*'||substr(item.ptr,36,2) 01395000
- Address COMMAND 'GLOBALV GET MOREGROUPS' 01396000
- if MoreGroups='NEXT' then 01397000
- ptr=ptr+1 01398000
- else if MoreGroups='PREV' then 01399000
- ptr=ptr-1 01400000
- if ptr>item.0 | ptr<1 then 01401000
- MoreGroups='QUIT' 01402000
- End /* While more groups */ 01403000
- End 01404000
- End 01405000
- index=index-(scrbot-2) 01406000
- Return 01407000
- /*-----------------------------------------------------------------*/ 01408000
- /* Routine to handle PFK Quit. */ 01409000
- /*-----------------------------------------------------------------*/ 01410000
- Return_Quit: 01411000
- Address COMMAND 'DESBUF' 01412000
- flag='QUIT' 01413000
- Return 01414000
- /*-----------------------------------------------------------------*/ 01415000
- /* Routine to PowerRead PFK. */ 01416000
- /*-----------------------------------------------------------------*/ 01417000
- PowerRead: 01418000
- arg which 01419000
- if which='TOGGLE' then 01420000
- do 01421000
- if power='QUIT' then power='NEXT' 01422000
- else if power='NEXT' then power='QUIT' 01423000
- else if power='PREV' then power='QUIT' 01424000
- else message 'Power setting unknown "'power'"!.' 01425000
- Address COMMAND 'GLOBALV SETL POWER' power 01426000
- index=index-(scrbot-2) 01427000
- end 01428000
- Address COMMAND 'GLOBALV SETL MOREGROUPS' power 01429000
- Return 01430000
- /*-----------------------------------------------------------------*/ 01431000
- /* Routine to handle PFK Subscribe/UnSubscribe */ 01432000
- /*-----------------------------------------------------------------*/ 01433000
- SubUnsub: 01434000
- Address COMMAND 'GLOBALV GET CURRHLIQ' 01435000
- if (row <= 2 | row > scrbot) then 01436000
- message='Cursor outside of area' 01437000
- else 01438000
- do 01439000
- if col<40 then ptr=index-scrbot+row 01440000
- else ptr=sindex-scrbot+row 01441000
- if ptr>item.0 then 01442000
- message='Cursor outside of area' 01443000
- else 01444000
- do 01445000
- if newcheck.ptr then 01446000
- do 01447000
- message='You have unsubscribed from' groupname.ptr 01448000
- newcheck.ptr='0' 01449000
- chkgroup=groupname.ptr 01450000
- if update.chkgroup.FrstLstLg^='' then 01451000
- do 01452000
- Call Group_Delete(chkgroup) 01453000
- CHGlist.0='1' 01454000
- CHGlist.chkgroup='Delete' 01455000
- end 01456000
- else 01457000
- message='unsubscribe operation failure' 01458000
- end 01459000
- else 01460000
- do 01461000
- message='You have subscribed to' groupname.ptr 01462000
- newcheck.ptr='1' 01463000
- article_log=first.ptr*1||' '||last.ptr*1||'$'||, 01464000
- compress_log(copies('0',max(0,last.ptr-first.ptr+1))) 01465000
- chkgroup=groupname.ptr 01466000
- if update.chkgroup.FrstLstLg='' then 01467000
- do 01468000
- Call Group_Add(chkgroup) 01469000
- if translate(currhliq)='OFF' then 01470000
- update.chkgroup.HiLvlIndx='' 01471000
- else 01472000
- update.chkgroup.HiLvlIndx=currhliq 01473000
- CHGlist.0='1' 01474000
- if CHGlist.chkgroup='Delete' then 01475000
- CHGList.chkgroup='' 01476000
- else 01477000
- CHGlist.chkgroup='Add' 01478000
- end 01479000
- else 01480000
- message='subscribe operation failure' 01481000
- end 01482000
- end 01483000
- end 01484000
- index=index-(scrbot-2) 01485000
- Return 01486000
- /*-----------------------------------------------------------------*/ 01487000
- /* Routine to handle PFK Headers. */ 01488000
- /*-----------------------------------------------------------------*/ 01489000
- Headers: 01490000
- MoreGroups='FIRST' 01491000
- if (row <= 2 | row > scrbot) then 01492000
- message='Cursor outside of area' 01493000
- else 01494000
- do 01495000
- if col<40 then ptr=index-scrbot+row 01496000
- else ptr=sindex-scrbot+row 01497000
- if ptr>item.0 then 01498000
- message='Cursor outside of area' 01499000
- else 01500000
- do 01501000
- do while(MoreGroups='NEXT', 01502000
- |MoreGroups='PREV', 01503000
- |MoreGroups='FIRST') 01504000
- if num.ptr=0 & MoreGroups='FIRST' then 01505000
- do 01506000
- index=index-(scrbot-2) 01507000
- Return 01508000
- end 01509000
- MoreGroups='QUIT' 01510000
- Address COMMAND 'GLOBALV SET THREAD 0' 01511000
- Address COMMAND 'GLOBALV SET REDUCE 0' 01512000
- Address COMMAND 'GLOBALV SET REDUCECNT 0' 01513000
- Address COMMAND 'GLOBALV GET NUMBER' 01514000
- Address COMMAND 'GLOBALV SET ARTICLE' 01515000
- newsflag='0' 01516000
- if newnews then 01517000
- do 01518000
- startnum=first.ptr 01519000
- if newcheck.ptr then 01520000
- do 01521000
- chkgroup=groupname.ptr 01522000
- parse var update.chkgroup.FrstLstLg frst_rem, 01523000
- last_rem '$' log '$*$' . 01524000
- if (frst_rem>=last_rem)&(log='ff'x) then 01525000
- newsflag='1' 01526000
- end 01527000
- end 01528000
- else 01529000
- startnum=0 01530000
- nntprc=NEWSXHDR(number startnum groupname.ptr newsflag) 01531000
- if nntprc^=0 then 01532000
- do 01533000
- message='Return from server ('||nntprc||')!' 01534000
- index=index-(scrbot-2) 01535000
- Return 01536000
- end 01537000
- group=groupname.ptr 01538000
- article_log=NNR$XHDR(group||' '||update.group.FrstLstLg) 01539000
- if newnews&article_log<>'' then 01540000
- do 01541000
- newcheck.ptr='1' 01542000
- parse var article_log frst_rem last_rem '$' . 01543000
- if update.group.FrstLstLg='' then 01544000
- do 01545000
- Call Group_Add(group) 01546000
- CHGlist.0='1' 01547000
- if CHGlist.group='Delete' then 01548000
- CHGList.group='' 01549000
- else 01550000
- CHGlist.group='Add' 01551000
- end 01552000
- else 01553000
- update.group.FrstLstLg=article_log 01554000
- first.ptr=word(update.group.FrstLstLg,1) 01555000
- num.ptr=count_log(article_log)+(last.ptr-last_rem) 01556000
- if num.ptr<0 | first.ptr=0 | last.ptr=0 then 01557000
- num.ptr=0 01558000
- end 01559000
- item.ptr=substr(item.ptr,1,28)||right(num.ptr,6)||'*'||, 01560000
- substr(item.ptr,36,2) 01561000
- Address COMMAND 'GLOBALV GET MOREGROUPS' 01562000
- if MoreGroups='NEXT' then 01563000
- ptr=ptr+1 01564000
- else if MoreGroups='PREV' then 01565000
- ptr=ptr-1 01566000
- if ptr>item.0 | ptr<1 then 01567000
- MoreGroups='QUIT' 01568000
- End /* while */ 01569000
- End 01570000
- End 01571000
- index=index-(scrbot-2) 01572000
- Return 01573000
- /*-----------------------------------------------------------------*/ 01574000
- /* Routine to handle PFK Posting. */ 01575000
- /*-----------------------------------------------------------------*/ 01576000
- SHLI_Post: 01577000
- if (row <= 2 | row > scrbot) then 01578000
- message='Cursor outside of area' 01579000
- else 01580000
- do 01581000
- if col<40 then ptr=index-scrbot+row 01582000
- else ptr=sindex-scrbot+row 01583000
- if ptr>item.0 then 01584000
- message='Cursor outside of area' 01585000
- else 01586000
- do 01587000
- Address COMMAND 'GLOBALV SETL NEWSGROUP '||, 01588000
- groupname.ptr 01589000
- Call POST$MAIL('SHLI') 01590000
- end 01591000
- end 01592000
- index=index-(scrbot-2) 01593000
- Return 01594000
- /*-----------------------------------------------------------------*/ 01595000
- /* Routine to handle PFK Backward. */ 01596000
- /*-----------------------------------------------------------------*/ 01597000
- SHLI_Backward: 01598000
- row=3;col=2; 01599000
- if index-(scrbot*3-6) > 1 then 01600000
- index=index-(scrbot*3-6) 01601000
- else 01602000
- Do 01603000
- message='Reached Top of File' 01604000
- index=0 01605000
- End 01606000
- Return 01607000
- /*-----------------------------------------------------------------*/ 01608000
- /* Routine to handle PFK Forward. */ 01609000
- /*-----------------------------------------------------------------*/ 01610000
- SHLI_Forward: 01611000
- row=3;col=2; 01612000
- If index+(scrbot*2-4) < item.0+scrbot-2 then 01613000
- index=index+(scrbot-2) 01614000
- else 01615000
- Do 01616000
- message='Reached End of File' 01617000
- index=index-(scrbot-2) 01618000
- End 01619000
- Return 01620000
- /**---------------------------------------------------------------**/ 01621000
- /** Network News Reader **/ 01622000
- /** Headers **/ 01623000
- /**---------------------------------------------------------------**/ 01624000
- NNR$XHDR: Procedure 01625000
- parse arg article_log 01626000
- 'Extract /lscreen' 01627000
- 'SET LINEND OFF' 01628000
- 'SET PF04 ONLY dummy' 01629000
- 'SET PF16 ONLY dummy' 01630000
- Address COMMAND 'GLOBALV SELECT VMNNTP' 01631000
- Address COMMAND 'GLOBALV GET VERSION' 01632000
- Address COMMAND 'GLOBALV GET NEWNEWS' 01633000
- Address COMMAND 'GLOBALV GET SOCKET' 01634000
- Address COMMAND 'GLOBALV GET THREAD' 01635000
- Address COMMAND 'GLOBALV GET REDUCE' 01636000
- Address COMMAND 'GLOBALV GET REDUCECNT' 01637000
- /*-----------------------------------------------------------------*/ 01638000
- /* Driver routine for the main menu screen. */ 01639000
- /*-----------------------------------------------------------------*/ 01640000
- save_article='' 01641000
- item.='' 01642000
- count=0 01643000
- prfx.='' 01644000
- Ext_Log='' 01645000
- if queued()>0 then parse pull group frst_act last_act 01646000
- else 01647000
- do 01648000
- Address COMMAND 'DESBUF' 01649000
- Return('') 01650000
- end 01651000
- i=1 01652000
- parse pull item.i 01653000
- do while (item.i^='.') 01654000
- i=i+1 01655000
- parse pull item.i 01656000
- end 01657000
- if i=1 then 01658000
- do 01659000
- Address COMMAND 'DESBUF' 01660000
- Return('') 01661000
- end 01662000
- item.i='' 01663000
- item.0=i-1 01664000
- prfx.0=i-1 01665000
- if ^thread&^reduce then 01666000
- do 01667000
- parse var article_log log_grp frst_rem last_rem '$' log '$*$' . 01668000
- if log^='' then 01669000
- log=expand_log(log) 01670000
- log=adjust_inlog(log) 01671000
- ext_log=adjust_inlog(ext_log) 01672000
- do j=1 to item.0 01673000
- parse var item.j article . /*stk*/01674000
- if Map_Log(article) then 01675000
- prfx.j='*' 01676000
- else 01677000
- prfx.j='.' 01678000
- end 01679000
- end 01680000
- else 01681000
- do 01682000
- log=copies('0',item.0) 01683000
- ext_log=copies('1',item.0) 01684000
- do i=1 to item.0 01685000
- prfx.i=substr(item.i,1,1) 01686000
- item.i=substr(item.i,2) 01687000
- end 01688000
- end 01689000
- scrbot=lscreen.1-4 01690000
- CMDline='0' 01691000
- index=0 01692000
- row=3;col=1 /*stk*/01693000
- flag = 'XHDR'; 01694000
- message = ''; 01695000
- Selected_Articles.='' 01696000
- Address COMMAND 'DESBUF' 01697000
- Do Forever; 01698000
- Call XHDRscreen; /* display main menu screen */ 01699000
- 'Read Nochange Tag' 01700000
- 'Extract /cursor' 01701000
- row = cursor.1; col = cursor.2; 01702000
- num=0 01703000
- Do While(Queued()>0) 01704000
- num=num+1 01705000
- Parse Pull QueuedLine.num 01706000
- end 01707000
- do i=1 to num 01708000
- Parse var QueuedLine.i key line column string; 01709000
- if key = "RES" Then Call XHDR_Reserved 01710000
- else SaveQueued=QueuedLine.i 01711000
- end 01712000
- Parse Var SaveQueued key line column string; 01713000
- Select 01714000
- When key = "ETK" Then Call Cursor 01715000
- When key = "CMD" Then Call XHDR_CommandLine 01716000
- When key = "PFK" Then Call XHDR_PFKeys 01717000
- otherwise Call AnythingElse 01718000
- End 01719000
- If flag = 'QUIT' Then 01720000
- do 01721000
- if thread | reduce then 01722000
- do 01723000
- log=BldNewLog(log) 01724000
- article_log=log 01725000
- end 01726000
- if ^thread&^reduce&newnews then 01727000
- do 01728000
- log=BldNewLog(log) 01729000
- if index(log,'1')>0 then 01730000
- do 01731000
- log=Adjust_OutLog(log) 01732000
- log=Compress_log(log) 01733000
- article_log=frst_rem||' '||last_rem||'$'||log 01734000
- end 01735000
- else 01736000
- article_log='' 01737000
- end 01738000
- Leave 01739000
- end 01740000
- End 01741000
- Return(article_log) 01742000
- /*-----------------------------------------------------------------*/ 01743000
- /* Routine to display the main menu screen. */ 01744000
- /*-----------------------------------------------------------------*/ 01745000
- XHDRscreen: /* set each line of the screen */ 01746000
- reduced=left('R '||reducecnt,5) 01747000
- 'Set Reserved' 1 'noh' '29'x'@'||reduced||left(' ',10), 01748000
- center('*** NNR/VM ('||version||') ***',35), 01749000
- right('Headers',25), 01750000
- '29'x'! ' 01751000
- 'Set Reserved' 2 'noh' '29'x'@'||group||, 01752000
- ' (Articles='||index+1||'/'||item.0||')'||'29'x'!' 01753000
- Do scrpos=3 to lscreen.1-4 01754000
- index=index+1 01755000
- parse value item.index with iart IFrom '4a'x ISubj /*stk*/01756000
- if col=1 then col = length(IFrom) + 3 /*stk*/01757000
- if iart<>'' then IFrom = , /*stk*/01758000
- IFrom||'29'x'$'||left(prfx.index,1)||'29'x'!'||ISubj /*stk*/01759000
- 'Set Reserved' scrpos 'noh' '29'x'!'IFrom /*stk*/01760000
- End 01761000
- 'Set Reserved' lscreen.1-3 'noh' 01762000
- if newnews then 01763000
- do 01764000
- 'Set Reserved' lscreen.1-2 'high', 01765000
- ' 1= Help ', 01766000
- ||'2= Article ', 01767000
- ||'3= Quit ', 01768000
- ||' 4= Selected ', 01769000
- ||' 5= Post ', 01770000
- ||' 6= Mrk2Here' 01771000
- 'Set Reserved' lscreen.1-1 'high', 01772000
- ' 7= Backward ', 01773000
- ||'8= Forward ', 01774000
- ||'9= Thread ', 01775000
- ||'10= Reduce ', 01776000
- ||'11= Mrk/UMrk ', 01777000
- ||'12= NxtGroup' 01778000
- end 01779000
- else 01780000
- do 01781000
- 'Set Reserved' lscreen.1-2 'high', 01782000
- ' 1= Help ', 01783000
- ||'2= Article ', 01784000
- ||'3= Quit ', 01785000
- ||' 4= Selected ', 01786000
- ||' 5= Post ', 01787000
- ||' 6= ' 01788000
- 'Set Reserved' lscreen.1-1 'high', 01789000
- ' 7= Backward ', 01790000
- ||'8= Forward ', 01791000
- ||'9= Thread ', 01792000
- ||'10= Reduce ', 01793000
- ||'11= ', 01794000
- ||'12= NxtGroup' 01795000
- end 01796000
- If message ^= "" Then 01797000
- Do; 01798000
- 'EMSG' message 01799000
- message = ''; 01800000
- End; 01801000
- 'Cursor screen' row col 01802000
- Return; 01803000
- /*-----------------------------------------------------------------*/ 01804000
- /* Routine to pick off the command line. */ 01805000
- /*-----------------------------------------------------------------*/ 01806000
- XHDR_CommandLine: 01807000
- line=translate(line); 01808000
- If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then 01809000
- Call WhichGroup('QUIT') 01810000
- Else If Abbrev('NGROUP',line,2) Then 01811000
- Call WhichGroup('NEXT') 01812000
- Else If Abbrev('PGROUP',line,2) Then 01813000
- Call WhichGroup('PREV') 01814000
- Else If (Abbrev('THREAD',line,3)) Then 01815000
- Do 01816000
- CMDline='1' 01817000
- line=line||' '||translate(column||' '||string) 01818000
- Call Thread 01819000
- CMDline='0' 01820000
- End 01821000
- else If (line = 'SUBSET') Then 01822000
- Call Subset 01823000
- else 01824000
- Do 01825000
- message = 'Unsupported command:' line column string; 01826000
- index=index-(scrbot-2) 01827000
- End 01828000
- Return 01829000
- /*-----------------------------------------------------------------*/ 01830000
- /* Routine to collect reserved lines. */ 01831000
- /*-----------------------------------------------------------------*/ 01832000
- XHDR_Reserved: 01833000
- if ((line > 2)&(line < (scrbot+1))) Then 01834000
- do 01835000
- ptr=index-scrbot+line 01836000
- prfx.ptr=string 01837000
- count=count+1 01838000
- Selected_Articles.count=word(item.ptr,1)||' '||ptr 01839000
- end 01840000
- else 01841000
- do 01842000
- message='Some articles selected are out of bounds!' 01843000
- end 01844000
- Return 01845000
- /*-----------------------------------------------------------------*/ 01846000
- /* Routine to handle the PFKs key. */ 01847000
- /*-----------------------------------------------------------------*/ 01848000
- XHDR_PFKeys: 01849000
- Call PFKmap 01850000
- If Line=1 then 01851000
- do 01852000
- Call NNR$HELP(2) 01853000
- index=index-(scrbot-2) 01854000
- end 01855000
- else If Line=2 then Call TArticle 01856000
- else If Line=3 then call WhichGroup('QUIT') 01857000
- else If Line=4 then call Selected_Articles 01858000
- else If Line=5 then call XHDR_Post 01859000
- else If Line=6 & newnews then call XHDR_Mark 01860000
- else If Line=7 then call XHDR_Backward 01861000
- else If Line=8 then call XHDR_Forward 01862000
- else If Line=9 then call Thread 01863000
- else If Line=10 then call Reduce 01864000
- else If Line=11 & newnews then call MrkUnmrk 01865000
- else If Line=12 then call WhichGroup('NEXT') 01866000
- else Call UnsupportedPFK 01867000
- Return 01868000
- /*-----------------------------------------------------------------*/ 01869000
- /* Routine to handle the PFKs key. */ 01870000
- /*-----------------------------------------------------------------*/ 01871000
- WhichGroup: 01872000
- arg which 01873000
- Address COMMAND 'GLOBALV SETL MOREGROUPS' which 01874000
- Address COMMAND 'DESBUF' 01875000
- flag='QUIT' 01876000
- Return 01877000
- /*-----------------------------------------------------------------*/ 01878000
- /* Routine to handle PFK Article. */ 01879000
- /*-----------------------------------------------------------------*/ 01880000
- TArticle: 01881000
- Address COMMAND 'GLOBALV GET MOREGROUPS' 01882000
- Address COMMAND 'GLOBALV SETL MOREGROUPS QUIT' 01883000
- if (row <= 2 | row > scrbot) then 01884000
- message='Cursor outside of area' 01885000
- else 01886000
- do 01887000
- ptr=index-scrbot+row 01888000
- if ptr>item.0 then 01889000
- message='Cursor outside of area' 01890000
- else 01891000
- do 01892000
- posting=1 01893000
- Address COMMAND 'GLOBALV SET LARTICLE 0' 01894000
- Address COMMAND 'GLOBALV SET FARTICLE 0' 01895000
- Address COMMAND 'GLOBALV SETL NEWSGROUP' group 01896000
- Address COMMAND 'GLOBALV SET ARTICLE '||, 01897000
- word(item.ptr,1) 01898000
- do while(posting) 01899000
- Address COMMAND 'GLOBALV GET HEADERS' 01900000
- Address COMMAND 'GLOBALV GET ARTICLE' 01901000
- Address COMMAND 'GLOBALV SET POSTING 0' 01902000
- nntprc=NEWSSeleI(headers group article 0) 01903000
- if nntprc^=0 then 01904000
- do 01905000
- message=nntprc 01906000
- index=index-(scrbot-2) 01907000
- Return 01908000
- end 01909000
- Address COMMAND 'GLOBALV GET POSTING' 01910000
- if posting then 01911000
- Call POST$MAIL('ARTI') 01912000
- End 01913000
- Address COMMAND 'GLOBALV GET FARTICLE' 01914000
- Address COMMAND 'GLOBALV GET LARTICLE' 01915000
- do i=FArticle to LArticle 01916000
- prfx.i='*' 01917000
- End 01918000
- End 01919000
- End 01920000
- index=index-(scrbot-2) 01921000
- Address COMMAND 'GLOBALV GET MOREGROUPS' 01922000
- if moregroups^='QUIT' then Call WhichGroup(moregroups) 01923000
- Return 01924000
- /*-----------------------------------------------------------------*/ 01925000
- /* Routine to handle Mark article. */ 01926000
- /*-----------------------------------------------------------------*/ 01927000
- XHDR_Mark: 01928000
- if row=lscreen.1 then 01929000
- do 01930000
- do i=1 to item.0 01931000
- prfx.i='*' 01932000
- end 01933000
- message='All UnRead articles were Marked!' 01934000
- end 01935000
- else if (row <= 2 | row > scrbot) then 01936000
- message='Cursor outside of area' 01937000
- else 01938000
- do 01939000
- ptr=index-scrbot+row 01940000
- if ptr>item.0 then 01941000
- message='Cursor outside of area' 01942000
- else 01943000
- do 01944000
- do i=1 to ptr 01945000
- prfx.i='*' 01946000
- end 01947000
- message='Unread Articles from' word(item.1,1) 'to', 01948000
- word(item.ptr,1) 'MARKed!' 01949000
- end 01950000
- end 01951000
- index=index-(scrbot-2) 01952000
- Return 01953000
- /*-----------------------------------------------------------------*/ 01954000
- /* Routine to handle Mark/UnMark. */ 01955000
- /*-----------------------------------------------------------------*/ 01956000
- MrkUNMrk: 01957000
- if (row <= 2 | row > scrbot) then 01958000
- message='Cursor outside of area' 01959000
- else 01960000
- do 01961000
- ptr=index-scrbot+row 01962000
- if ptr>item.0 then 01963000
- message='Cursor outside of area' 01964000
- else 01965000
- do 01966000
- if prfx.ptr='*' then 01967000
- do 01968000
- prfx.ptr='.' 01969000
- message='Article' word(item.ptr,1) 'UnMarked!' 01970000
- end 01971000
- else 01972000
- do 01973000
- prfx.ptr='*' 01974000
- message='Article' word(item.ptr,1) 'Marked!' 01975000
- end 01976000
- end 01977000
- end 01978000
- index=index-(scrbot-2) 01979000
- Return 01980000
- /*-----------------------------------------------------------------*/ 01981000
- /* Routine to handle PFK Selected_Artcicles. */ 01982000
- /*-----------------------------------------------------------------*/ 01983000
- Selected_Articles: 01984000
- Address COMMAND 'GLOBALV GET MOREGROUPS' 01985000
- Address COMMAND 'GLOBALV SETL MOREGROUPS QUIT' 01986000
- if Selected_Articles.1='' then 01987000
- do 01988000
- message='There were *no* "Selected Articles"!' 01989000
- index=index-(scrbot-2) 01990000
- return 01991000
- end 01992000
- posting=1 01993000
- Address COMMAND 'GLOBALV SETL NEWSGROUP' group 01994000
- Address COMMAND 'GLOBALV SET ARTICLE '||, 01995000
- word(Selected_Articles.1,1) 01996000
- Address COMMAND 'GLOBALV SET LARTICLE 0' 01997000
- Address COMMAND 'GLOBALV SET FARTICLE 0' 01998000
- do while(posting) 01999000
- Selected_Articles.0=count 02000000
- Address COMMAND 'GLOBALV GET HEADERS' 02001000
- Address COMMAND 'GLOBALV GET ARTICLE' 02002000
- Address COMMAND 'GLOBALV SET POSTING 0' 02003000
- nntprc=NEWSSeleS(headers group article 0) 02004000
- if nntprc^=0 then 02005000
- do 02006000
- message=nntprc 02007000
- index=index-(scrbot-2) 02008000
- Return 02009000
- end 02010000
- Address COMMAND 'GLOBALV GET POSTING' 02011000
- if posting then 02012000
- Call POST$MAIL('ARTI') 02013000
- End 02014000
- Address COMMAND 'GLOBALV GET LARTICLE' 02015000
- Address COMMAND 'GLOBALV GET FARTICLE' 02016000
- do i=FArticle to LArticle 02017000
- ptr=Word(Selected_Articles.i,2) 02018000
- prfx.ptr='*' 02019000
- end 02020000
- count=0 02021000
- Selected_Articles.='' 02022000
- index=index-(scrbot-2) 02023000
- Address COMMAND 'GLOBALV GET MOREGROUPS' 02024000
- if moregroups^='QUIT' then Call WhichGroup(moregroups) 02025000
- Return 02026000
- /*-----------------------------------------------------------------*/ 02027000
- /* Routine to handle PFK Thread. */ 02028000
- /*-----------------------------------------------------------------*/ 02029000
- Thread: 02030000
- if (row <= 2 | row > scrbot)&^CMDline then 02031000
- message='Cursor outside of area' 02032000
- else 02033000
- do 02034000
- ptr=index-scrbot+row 02035000
- if ptr>item.0&^CMDline then 02036000
- message='Cursor outside of area' 02037000
- else 02038000
- do 02039000
- if CMDline then 02040000
- tstsub=subword(line,2) 02041000
- else 02042000
- parse upper value item.ptr with . '4a'x tstsub /*stk*/02043000
- if word(tstsub,1)='RE:' then 02044000
- tstsub=subword(tstsub,2) 02045000
- queue group 02046000
- save_items='' 02047000
- do i=1 to item.0 02048000
- if index(translate(item.i),tstsub)>0 then 02049000
- do 02050000
- queue prfx.i||item.i 02051000
- save_items=save_items||i||' ' 02052000
- end 02053000
- end 02054000
- queue '.' 02055000
- Address COMMAND 'GLOBALV SET THREAD 1' 02056000
- thread_log='' 02057000
- thread_log=NNR$XHDR(group||' 0 0$'||'ff'x) 02058000
- Address COMMAND 'GLOBALV SET THREAD 0' 02059000
- do i=1 to length(thread_log) 02060000
- ptr=word(save_items,i) 02061000
- prfx.ptr=substr('.*',substr(thread_log,i,1)+1,1) 02062000
- end 02063000
- thread_log='' 02064000
- save_items='' 02065000
- end 02066000
- end 02067000
- index=index-(scrbot-2) 02068000
- Return 02069000
- /*-----------------------------------------------------------------*/ 02070000
- /* Routine to handle PFK Reduce. */ 02071000
- /*-----------------------------------------------------------------*/ 02072000
- Reduce: 02073000
- queue group 02074000
- save_items='' 02075000
- do i=1 to item.0 02076000
- if prfx.i^='*' then 02077000
- do 02078000
- queue prfx.i||item.i 02079000
- save_items=save_items||i||' ' 02080000
- end 02081000
- end 02082000
- if save_items='' then 02083000
- do 02084000
- message='There were *no* unread articles(nothing to reduce to)!' 02085000
- index=index-(scrbot-2) 02086000
- return 02087000
- end 02088000
- queue '.' 02089000
- reduce_log='' 02090000
- Address COMMAND 'GLOBALV SET REDUCE 1' 02091000
- Address COMMAND 'GLOBALV SET REDUCECNT' reducecnt+1 02092000
- reduce_log=NNR$XHDR(group||' 0 0$'||'ff'x) 02093000
- Address COMMAND 'GLOBALV SET REDUCE 0' 02094000
- Address COMMAND 'GLOBALV SET REDUCECNT' reducecnt-1 02095000
- do i=1 to length(reduce_log) 02096000
- if substr(reduce_log,i,1) then 02097000
- do 02098000
- ptr=word(save_items,i) 02099000
- prfx.ptr='*' 02100000
- end 02101000
- end 02102000
- thread_log='' 02103000
- save_items='' 02104000
- index=index-(scrbot-2) 02105000
- Return 02106000
- /*-----------------------------------------------------------------*/ 02107000
- /* Routine to handle PFK Posting. */ 02108000
- /*-----------------------------------------------------------------*/ 02109000
- XHDR_Post: 02110000
- if (row <= 2 | row > scrbot) then 02111000
- message='Cursor outside of area' 02112000
- else 02113000
- do 02114000
- ptr=index-scrbot+row 02115000
- if ptr>item.0 then 02116000
- message='Cursor outside of area' 02117000
- else 02118000
- do 02119000
- Address COMMAND 'GLOBALV SETL NEWSGROUP' group 02120000
- Address COMMAND 'GLOBALV SETL SUBJECT', 02121000
- substr(item.ptr,28) 02122000
- Call POST$MAIL('XHDR') 02123000
- end 02124000
- end 02125000
- index=index-(scrbot-2) 02126000
- Return 02127000
- /*-----------------------------------------------------------------*/ 02128000
- /* Routine to handle PFK Backward. */ 02129000
- /*-----------------------------------------------------------------*/ 02130000
- XHDR_Backward: 02131000
- row=3;col=1 /*stk*/02132000
- if index-(scrbot*2-4) > 1 then 02133000
- index=index-(scrbot*2-4) 02134000
- else 02135000
- Do 02136000
- message='Reached Top of File' 02137000
- index=0 02138000
- End 02139000
- Return 02140000
- /*-----------------------------------------------------------------*/ 02141000
- /* Routine to handle PFK Forward. */ 02142000
- /*-----------------------------------------------------------------*/ 02143000
- XHDR_Forward: 02144000
- row=3;col=1 /*stk*/02145000
- if index+(scrbot-2) < item.0+(scrbot-2) then 02146000
- nop 02147000
- else 02148000
- Do 02149000
- message='Reached End of File' 02150000
- index=index-(scrbot-2) 02151000
- End 02152000
- Return 02153000
- POST$MAIL: Procedure 02154000
- arg PostScreen 02155000
- /**---------------------------------------------------------------**/ 02156000
- /** Network News Reader **/ 02157000
- /** POSTMAIL**/ 02158000
- /**---------------------------------------------------------------**/ 02159000
- pbrc = 'Not really initialized.' /* cf. line 02072420 */ 02160000
- 'Extract /lscreen' 02161000
- 'Set msgline on' lscreen.1-3 '2 overlay' 02162000
- 'SET PF04 ONLY dummy' 02163000
- 'SET PF16 ONLY dummy' 02164000
- Address COMMAND 'EXECIO 1 CP ( VAR MYTIME STRING QUERY TIME' 02165000
- mytime=word(mytime,3)||' '||word(mytime,4) 02166000
- Address COMMAND 'GLOBALV SELECT VMNNTP' 02167000
- Address COMMAND 'GLOBALV GET THISNODE' 02168000
- Address COMMAND 'GLOBALV GET MAILER' 02169000
- Address COMMAND 'GLOBALV GET ORGANIZATION' 02170000
- Address COMMAND 'GLOBALV GET NEWSGROUP' 02171000
- Address COMMAND 'GLOBALV GET SUBJECT' 02172000
- Address COMMAND 'GLOBALV GET VERSION' 02173000
- Address COMMAND 'GLOBALV GET HEADERS' 02174000
- Address COMMAND 'GLOBALV GET SOCKET' 02175000
- Address COMMAND 'GLOBALV GET LOGPOSTS' 02176000
- head.='' 02177000
- posth.='' 02178000
- postb.='' 02179000
- flag = 'POSTMAIL' 02180000
- Address Command 'SET CMSTYPE HT' 02181000
- Address Command 'STATE $POST$ $$NEWS$$ A' 02182000
- PrevRC=rc 02183000
- Address Command 'SET CMSTYPE RT' 02184000
- if PostScreen='ARTI' then 02185000
- Call ProcessPScreen1 02186000
- else if Prevrc=0 then 02187000
- do 02188000
- Queue '************************************************************'02189000
- Queue '* *'02190000
- Queue '* You have come to this screen because you have started a *'02191000
- Queue '* previous POSTing/MAILing. At this point you may "ERASE" *'02192000
- Queue '* or "Resume" the previous "POSTing". *'02193000
- Queue '* *'02194000
- Queue '************************************************************'02195000
- Queue '.' 02196000
- Call ProcessPScreen1 02197000
- end 02198000
- if flag^='QUIT' Then 02199000
- Call ProcessPScreen2 02200000
- Address COMMAND 'SET CMSTYPE HT' 02201000
- Address COMMAND 'ERASE N$N$T$P$ P$O$S$T$' 02202000
- Address COMMAND 'SET CMSTYPE RT' 02203000
- Return 02204000
- /*-----------------------------------------------------------------*/ 02205000
- /* Routine to display the main menu screen. */ 02206000
- /*-----------------------------------------------------------------*/ 02207000
- ProcessPScreen1: 02208000
- i=1 02209000
- parse pull head.i 02210000
- do while (head.i^='.') 02211000
- i=i+1 02212000
- parse pull head.i 02213000
- do while index(head.i,'ff'x)>0 02214000
- parse pull tempstr 02215000
- head.i=substr(head.i,1,length(head.i)-1)||tempstr 02216000
- end 02217000
- end 02218000
- head.i='' 02219000
- i=i-1 02220000
- head.0=i 02221000
- Address Command 'SET CMSTYPE HT' 02222000
- Address Command 'STATE $POST$ $$NEWS$$ A' 02223000
- PrevRC=rc 02224000
- Address Command 'SET CMSTYPE RT' 02225000
- if Prevrc=0 then 02226000
- message='Previous POST file exists, either "Resume" or "ERASE"' 02227000
- else 02228000
- message = ''; 02229000
- newsub='' 02230000
- row=lscreen.1; col=7 02231000
- Address COMMAND 'DESBUF' 02232000
- Do Forever; 02233000
- Call 1st_post 02234000
- 'Read Nochange Tag' 02235000
- 'Extract /cursor' 02236000
- row = cursor.5; col = cursor.6 02237000
- num=0 02238000
- Do While(Queued()>0) 02239000
- num=num+1 02240000
- Parse Pull QueuedLine.num 02241000
- end 02242000
- do i=1 to num 02243000
- Parse var QueuedLine.i key line column string; 02244000
- if key = "RES" Then Nop 02245000
- else SaveQueued=QueuedLine.i 02246000
- end 02247000
- Parse Var SaveQueued key line column string; 02248000
- Select 02249000
- When key = "CMD" Then Call POST1_CommandLine 02250000
- When key = "PFK" Then Call POST1_PFKeys 02251000
- When key = "ETK" Then 02252000
- do 02253000
- 'CURSOR HOME' 02254000
- 'EXTRACT /CURSOR/' 02255000
- row=cursor.1 02256000
- col=cursor.2 02257000
- end 02258000
- otherwise Nop 02259000
- End 02260000
- If flag^='POSTMAIL' then 02261000
- leave 02262000
- End 02263000
- Return 02264000
- /*-----------------------------------------------------------------*/ 02265000
- /* Routine to display the main menu screen. */ 02266000
- /*-----------------------------------------------------------------*/ 02267000
- 1st_post: /* set each line of the screen */ 02268000
- 'Set Reserved' 1 'noh' '29'x'! ' '29'x'@', 02269000
- center('*** NNR/VM ('||version||') ***',35), 02270000
- right('Post(1)',25), 02271000
- '29'x'! ' 02272000
- 'Set Reserved' 2 'noh' 02273000
- 'Set Reserved' 3 'noh' '29'x'!'||, 02274000
- 'Posting is setup in multiple stages. Stage 1 (this stage) requires'||, 02275000
- '29'x'!' 02276000
- 'Set Reserved' 4 'noh' '29'x'!'||, 02277000
- 'you to select how the article is to be manipulated. Please select'||, 02278000
- '29'x'!' 02279000
- 'Set Reserved' 5 'noh' '29'x'!'||, 02280000
- 'one of the PFKs listed below.'||, 02281000
- '29'x'!' 02282000
- 'Set Reserved' 6 'noh' 02283000
- Do scrpos=7 to lscreen.1-4 02284000
- index=scrpos-7+1 02285000
- 'Set Reserved' scrpos 'noh' '29'x'*'||left(head.index,78)||'29'x'!' 02286000
- End 02287000
- 'Set Reserved' lscreen.1-3 'noh' 02288000
- 'Set Reserved' lscreen.1-2 'high', 02289000
- ' 1= Help ', 02290000
- ||'2= ', 02291000
- ||'3= Quit ', 02292000
- ||' 4= ', 02293000
- ||' 5= ', 02294000
- ||' 6= Resume ' 02295000
- 'Set Reserved' lscreen.1-1 'high', 02296000
- ' 7= ', 02297000
- ||'8= ', 02298000
- ||'9= Followup ', 02299000
- ||'10= Mail ', 02300000
- ||'11= Reply ', 02301000
- ||'12= ERASE ' 02302000
- If message ^= "" Then 02303000
- Do 02304000
- 'EMSG' message 02305000
- message = '' 02306000
- End; 02307000
- 'Cursor screen' row col 02308000
- Return 02309000
- /*-----------------------------------------------------------------*/ 02310000
- /* Routine to pick off the command line. */ 02311000
- /*-----------------------------------------------------------------*/ 02312000
- POST1_CommandLine: 02313000
- line=translate(line) 02314000
- If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then 02315000
- Do 02316000
- Flag = 'QUIT' /* clear stack */ 02317000
- End 02318000
- Else If (Abbrev('ERASE',line,3) | line = 'ERASE') Then 02319000
- Call ERASE_Post 02320000
- Else 02321000
- message = 'Unsupported command:' line column string 02322000
- Return 02323000
- /*-----------------------------------------------------------------*/ 02324000
- /* Routine to handle the PFKs key. */ 02325000
- /*-----------------------------------------------------------------*/ 02326000
- POST1_PFKeys: 02327000
- Call PFKmap 02328000
- If Line=1 then Call NNR$HELP(4) 02329000
- else If Line=3 then Flag = 'QUIT' 02330000
- else If Line=6 then Call Resume_Post 02331000
- else If Line=9 then Flag = 'FOLLOWUP' 02332000
- else If Line=10 then Flag = 'MAIL' 02333000
- else If Line=11 then Flag = 'REPLY' 02334000
- else If Line=12 then Call ERASE_Post 02335000
- else message='Unsupported PFK' 02336000
- if (PrevRC=0) & ((Flag^='RESUME') & (Flag^='QUIT')) then 02337000
- do 02338000
- message=, 02339000
- 'Previous POST file exists, either "Resume" or "ERASE"' 02340000
- Flag='POSTMAIL' 02341000
- end 02342000
- Return 02343000
- /*-----------------------------------------------------------------*/ 02344000
- /* Routine to handle ERASE PFK Key. */ 02345000
- /*-----------------------------------------------------------------*/ 02346000
- ERASE_Post: 02347000
- if PrevRC=0 then 02348000
- do 02349000
- PrevRC=-1 02350000
- if PostScreen^='ARTI' then Flag='POST_ERASE' 02351000
- Address Command 'SET CMSTYPE HT' 02352000
- Address Command 'ERASE $POST$ $$NEWS$$ A' 02353000
- Address Command 'SET CMSTYPE RT' 02354000
- end 02355000
- else message='Previous POST file does not exist!' 02356000
- Return 02357000
- /*-----------------------------------------------------------------*/ 02358000
- /* Routine to handle resume PFK Key. */ 02359000
- /*-----------------------------------------------------------------*/ 02360000
- Resume_Post: 02361000
- if PrevRC=0 then 02362000
- do 02363000
- Flag='RESUME' 02364000
- PostScreen='RESU' 02365000
- Address Command 'SET CMSTYPE HT' 02366000
- Address Command 'ERASE N$N$T$P$ P$O$S$T$ A' 02367000
- Address Command 'SET CMSTYPE RT' 02368000
- end 02369000
- else message='Previous POST file does not exist!' 02370000
- Return 02371000
- /*-----------------------------------------------------------------*/ 02372000
- /* Routine to Process the 2nd post menu screen. */ 02373000
- /*-----------------------------------------------------------------*/ 02374000
- ProcessPScreen2: 02375000
- mailTo='' 02376000
- if PostScreen='ARTI' then 02377000
- do 02378000
- do i=1 to head.0 02379000
- if substr(head.i,1,length('From:'))='From:' then 02380000
- head.F=strip(substr(head.i,length('From:')+1)) 02381000
- if substr(head.i,1,length('Newsgroups:'))='Newsgroups:' then 02382000
- head.N=strip(substr(head.i,length('Newsgroups:')+1)) 02383000
- if substr(head.i,1,length('Subject:'))='Subject:' then 02384000
- head.S=strip(substr(head.i,length('Subject:')+1)) 02385000
- if substr(head.i,1,length('Message-ID:'))='Message-ID:' then 02386000
- head.M=strip(substr(head.i,length('Message-ID:')+1)) 02387000
- if substr(head.i,1,length('Date:'))='Date:' then 02388000
- head.D=strip(substr(head.i,length('Date:')+1)) 02389000
- if substr(head.i,1,length('References:'))='References:' then 02390000
- head.R=strip(substr(head.i,length('References:')+1)) 02391000
- end 02392000
- subject=head.S 02393000
- if Flag='MAIL' | Flag='REPLY' Then 02394000
- newsgroup='' 02395000
- else 02396000
- newsgroup=head.N 02397000
- end 02398000
- Else If PostScreen='SHLI' then 02399000
- do 02400000
- Address COMMAND 'GLOBALV GET NEWSGROUP' 02401000
- Subject='' 02402000
- end 02403000
- Else If PostScreen='CMS' then 02404000
- do 02405000
- Address COMMAND 'GLOBALV GET NEWSGROUP' 02406000
- Subject='' 02407000
- end 02408000
- Else If PostScreen='XHDR' then 02409000
- do 02410000
- Address COMMAND 'GLOBALV GET NEWSGROUP' 02411000
- Address COMMAND 'GLOBALV GET SUBJECT' 02412000
- end 02413000
- Else If PostScreen='RESU' then 02414000
- do 02415000
- Address COMMAND 'EXECIO * DISKR $POST$ $$NEWS$$ A ('||, 02416000
- 'FINIS STEM HEAD.' 02417000
- Address COMMAND 'ERASE $POST$ $$OLDN$$ A' 02418000
- Address COMMAND 'RENAME $POST$ $$NEWS$$ A $POST$ $$OLDN$$ A' 02419000
- do i=1 to head.0 while length(strip(head.i)) > 0 02420000
- if substr(head.i,1,length('From:'))='From:' then 02421000
- head.F=strip(substr(head.i,length('From:')+1)) 02422000
- if substr(head.i,1,length('Newsgroups:'))='Newsgroups:' then 02423000
- head.N=strip(substr(head.i,length('Newsgroups:')+1)) 02424000
- if substr(head.i,1,length('Subject:'))='Subject:' then 02425000
- head.S=strip(substr(head.i,length('Subject:')+1)) 02426000
- if substr(head.i,1,length('Message-ID:'))='Message-ID:' then 02427000
- head.M=strip(substr(head.i,length('Message-ID:')+1)) 02428000
- if substr(head.i,1,length('Date:'))='Date:' then 02429000
- head.D=strip(substr(head.i,length('Date:')+1)) 02430000
- if substr(head.i,1,length('To:'))='To:' then 02431000
- head.T=strip(substr(head.i,length('To:')+1)) 02432000
- if substr(head.i,1,length('References:'))='References:' then 02433000
- head.R=strip(substr(head.i,length('References:')+1)) 02434000
- end 02435000
- subject=head.S 02436000
- newsgroup=head.N 02437000
- mailto=head.T 02438000
- Address COMMAND 'ERASE N$N$T$P$ P$O$S$T$ A' 02439000
- Do j=i+1 to head.0 02440000
- Address COMMAND 'EXECIO 1 DISKW N$N$T$P$ P$O$S$T$ A', 02441000
- '0 V 150 ( STRING' head.j 02442000
- End 02443000
- Address COMMAND 'FINIS N$N$T$P$ P$O$S$T$ A' 02444000
- end 02445000
- NewHead.='' 02446000
- subject=strip(subject) 02447000
- newsgroup=strip(newsgroup) 02448000
- mailTo=strip(mailTo) 02449000
- If PostScreen^='RESU' &, 02450000
- subject^='' &, 02451000
- translate(left(subject,3)) ^= 'RE:' then 02452000
- NewHead.S='Re: '||subject 02453000
- else 02454000
- NewHead.S=subject 02455000
- NewHead.N=newsgroup 02456000
- NewHead.T=mailTo 02457000
- Address COMMAND 'SET CMSTYPE HT' 02458000
- fullname = Fullname() 02459000
- Address COMMAND 'SET CMSTYPE RT' 02460000
- If fullname^='' then 02461000
- fullname = ' ('||fullname||')' 02462000
- NewHead.F=userid()||'@'||thisnode||fullname 02463000
- NewHead.P=thisnode||'!'||userid() 02464000
- mydate=date('U') 02465000
- parse var mydate mm '/' dd '/' yy 02466000
- wkd=substr(date('W'),1,3) 02467000
- mon=substr(date('M'),1,3) 02468000
- NewHead.D=wkd||',' dd mon yy mytime 02469000
- NewHead.O=organization 02470000
- local_part=d2x(date('J'))d2x(time('S'))'.'userid() 02471000
- NewHead.M='<'local_part'@'thisnode'>' 02472000
- if Flag='RESUME' | Flag='POST_ERASE' then 02473000
- NewHead.R=Head.R 02474000
- else 02475000
- NewHead.R=Head.R||' '||Head.M 02476000
- if Flag='REPLY' Then 02477000
- NewHead.T=Head.F 02478000
- message = ''; 02479000
- successful='0' 02480000
- row=lscreen.1; col=7 02481000
- Address COMMAND 'DESBUF' 02482000
- Do Forever 02483000
- Call 2nd_post 02484000
- 'Read Nochange Tag' 02485000
- 'Extract /cursor' 02486000
- row = cursor.5; col = cursor.6; 02487000
- num=0 02488000
- Do While(Queued()>0) 02489000
- num=num+1 02490000
- Parse Pull QueuedLine.num 02491000
- end 02492000
- do i=1 to num 02493000
- Parse var QueuedLine.i key line column string; 02494000
- if key = "RES" Then Call POST2_Reserved 02495000
- else SaveQueued=QueuedLine.i 02496000
- end 02497000
- Parse Var SaveQueued key line column string; 02498000
- Select 02499000
- When key = "CMD" Then Call POST2_CommandLine 02500000
- When key = "PFK" Then Call POST2_PFKeys 02501000
- When key = "ETK" Then 02502000
- do 02503000
- 'CURSOR HOME' 02504000
- 'EXTRACT /CURSOR/' 02505000
- row=cursor.1 02506000
- col=cursor.2 02507000
- end 02508000
- otherwise Nop 02509000
- End 02510000
- If flag='QUIT' then 02511000
- leave 02512000
- End 02513000
- Return 02514000
- /*-----------------------------------------------------------------*/ 02515000
- /* Routine to handle reserved lines. */ 02516000
- /*-----------------------------------------------------------------*/ 02517000
- POST2_Reserved: 02518000
- string=strip(string) 02519000
- if line = 8 Then 02520000
- NewHead.F=string 02521000
- else if line = 9 Then 02522000
- do 02523000
- if Flag='MAIL' | Flag='REPLY' | NewHead.N='' Then 02524000
- do 02525000
- NewHead.T=MailName(string) 02526000
- end 02527000
- else 02528000
- do 02529000
- if length(string)>0 then 02530000
- NewHead.N=string 02531000
- else 02532000
- Message='Newsgroups header *must* have a value!' 02533000
- end 02534000
- end 02535000
- else if line = 10 Then 02536000
- NewHead.S=string 02537000
- Return 02538000
- /*-----------------------------------------------------------------*/ 02539000
- /* Routine to handle the PFKs key. */ 02540000
- /*-----------------------------------------------------------------*/ 02541000
- POST2_PFKeys: 02542000
- Call PFKmap 02543000
- If Line=1 then Call NNR$HELP(3) 02544000
- else If Line=5 then Call Post_Edit 02545000
- else If Line=3 then call Post_Quit 02546000
- else If Line=6 then call PM_Article 02547000
- else message='Unsupported PFK' 02548000
- Return 02549000
- /*-----------------------------------------------------------------*/ 02550000
- /* Routine to pick off the command line. */ 02551000
- /*-----------------------------------------------------------------*/ 02552000
- POST2_CommandLine: 02553000
- line=translate(line) 02554000
- If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then 02555000
- Do 02556000
- Flag = 'QUIT' /* clear stack */ 02557000
- End 02558000
- Else 02559000
- message = 'Unsupported command:' line column string 02560000
- Return 02561000
- /*-----------------------------------------------------------------*/ 02562000
- /* Routine to display the 2nd post menu screen. */ 02563000
- /*-----------------------------------------------------------------*/ 02564000
- 2nd_post: /* set each line of the screen */ 02565000
- 'Set Reserved' 1 'noh' '29'x'! ' '29'x'@', 02566000
- center('*** NNR/VM ('||version||') ***',35), 02567000
- right('Post(2)',25), 02568000
- '29'x'! ' 02569000
- 'Set Reserved' 2 'noh' 02570000
- 'Set Reserved' 3 'noh' '29'x'!'||, 02571000
- 'Posting is setup in multiple stages. On this screen you are required', 02572000
- '29'x'!' 02573000
- 'Set Reserved' 4 'noh' '29'x'!'||, 02574000
- 'to fill in the highlighted fields and make any modifications to the'||,02575000
- '29'x'!' 02576000
- 'Set Reserved' 5 'noh' '29'x'!'||, 02577000
- 'header area. When the needed information has been supplied please '||, 02578000
- '29'x'!' 02579000
- 'Set Reserved' 6 'noh' '29'x'!'||, 02580000
- 'select from the PFK list below. '||,02581000
- '29'x'!' 02582000
- 'Set Reserved' 7 'noh' 02583000
- 'Set Reserved' 8 'noh' '29'x'@ From:'||'29'x'*'||, 02584000
- Left(NewHead.F,60)'29'x'!' 02585000
- if Flag='MAIL' | Flag='REPLY' | NewHead.N='' Then 02586000
- do 02587000
- 'Set Reserved' 9 'noh' '29'x'@ To:'||'29'x'*'||, 02588000
- Left(NewHead.T,60)'29'x'!' 02589000
- end 02590000
- else 02591000
- do 02592000
- 'Set Reserved' 9 'noh' '29'x'@ Newsgroups:'||'29'x'*'||, 02593000
- Left(NewHead.N,60)'29'x'!' 02594000
- end 02595000
- 'Set Reserved' 10 'noh' '29'x'@ Subject:'||'29'x'*'||, 02596000
- Left(NewHead.S,60)'29'x'!' 02597000
- Do scrpos=11 to lscreen.1-4 02598000
- 'Set Reserved' scrpos 'noh' 02599000
- End 02600000
- 'Set Reserved' lscreen.1-3 'noh' 02601000
- 'Set Reserved' lscreen.1-2 'high', 02602000
- ' 1= Help ', 02603000
- ||'2= ', 02604000
- ||'3= Quit ', 02605000
- ||' 4= ', 02606000
- ||' 5= Edit ', 02607000
- ||' 6= Send ' 02608000
- 'Set Reserved' lscreen.1-1 'high', 02609000
- ' 7= ', 02610000
- ||'8= ', 02611000
- ||'9= ', 02612000
- ||'10= ', 02613000
- ||'11= ', 02614000
- ||'12= ' 02615000
- If message ^= "" Then 02616000
- Do 02617000
- 'EMSG' message 02618000
- message = '' 02619000
- End; 02620000
- 'Cursor screen' row col 02621000
- Return 02622000
- /*-----------------------------------------------------------------*/ 02623000
- /* Routine to determine post or mail */ 02624000
- /*-----------------------------------------------------------------*/ 02625000
- PM_Article: 02626000
- if Flag='MAIL' | Flag='REPLY' | NewHead.N='' Then 02627000
- Call Mail_Article 02628000
- else 02629000
- Call Post_Article 02630000
- Return 02631000
- /*-----------------------------------------------------------------*/ 02632000
- /* Routine to Exit PostMail procedure */ 02633000
- /*-----------------------------------------------------------------*/ 02634000
- Post_Quit: 02635000
- Address COMMAND 'ERASE $POST$ $$NEWS$$ A' 02636000
- if Successful then 02637000
- do 02638000
- if LogPosts then 02639000
- do 02640000
- notebook='NNRPMLOG' 02641000
- Address COMMAND 'EXECIO 1 DISKW' notebook, 02642000
- 'NOTEBOOK A 0 V 132 (STRING' copies('=',72) 02643000
- Address COMMAND 'EXECIO' posth.0 'DISKW' notebook, 02644000
- 'NOTEBOOK A 0 V 132 ( FINIS STEM POSTH.' 02645000
- Address COMMAND 'EXECIO 1 DISKW' notebook, 02646000
- 'NOTEBOOK A 0 V 132 ( STRING ' 02647000
- Address COMMAND 'EXECIO' postb.0 'DISKW' notebook, 02648000
- 'NOTEBOOK A 0 V 132 ( FINIS STEM POSTB.' 02649000
- end 02650000
- Address COMMAND 'ERASE $POST$ $$OLDN$$ A' 02651000
- end 02652000
- else if postb.0^='' then 02653000
- do 02654000
- Call GenHeaders 02655000
- Address COMMAND 'EXECIO' posth.0 'DISKW $POST$ $$NEWS$$ A', 02656000
- '0 V 1024 (STEM POSTH.' 02657000
- Address COMMAND 'EXECIO 1 DISKW $POST$ $$NEWS$$ A', 02658000
- '0 V 1024 ( STRING ' 02659000
- Address COMMAND 'EXECIO' postb.0 'DISKW $POST$ $$NEWS$$ A', 02660000
- '0 V 1024 (FINIS STEM POSTB.' 02661000
- Address COMMAND 'ERASE $POST$ $$OLDN$$ A' 02662000
- end 02663000
- else 02664000
- do 02665000
- Address COMMAND 'RENAME $POST$ $$OLDN$$ A $POST$ $$NEWS$$ A' 02666000
- end 02667000
- Address COMMAND 'DESBUF' 02668000
- flag='QUIT' 02669000
- Return 02670000
- /*-----------------------------------------------------------------*/ 02671000
- /* Routine to find nicknames */ 02672000
- /*-----------------------------------------------------------------*/ 02673000
- MailName: Procedure 02674000
- parse arg string 02675000
- newto=string; 02676000
- rcptto=newto 02677000
- 'STATE' userid() 'NAMES *' 02678000
- if rc=0 then 02679000
- do 02680000
- 'NAMEFIND :NICK' newto ' :USERID (LIFO 1' 02681000
- if rc=0 then 02682000
- do 02683000
- parse pull newuid 02684000
- rcptto=newuid 02685000
- 'NAMEFIND :NICK' newto ' :NODE (LIFO 1' 02686000
- if rc=0 then 02687000
- do 02688000
- parse pull newnode 02689000
- rcptto=newuid||'@'||newnode 02690000
- 'NAMEFIND :NICK' newto ' :NAME (LIFO 1' 02691000
- if rc=0 then 02692000
- do 02693000
- parse pull newname 02694000
- rcptto=newuid||'@'||newnode||' ('newname')' 02695000
- end 02696000
- end 02697000
- end 02698000
- end 02699000
- Return rcptto 02700000
- /*-----------------------------------------------------------------*/ 02701000
- /* Function to look up full name of poster */ 02702000
- /*-----------------------------------------------------------------*/ 02703000
- Fullname: procedure expose thisnode 02704000
- myname = Namefind(userid(),thisnode) 02705000
- if myname='' then 02706000
- do 02707000
- 'IDENTIFY (LIFO' 02708000
- parse pull . . njenode . 02709000
- myname = Namefind(userid(),njenode) 02710000
- end 02711000
- Return myname 02712000
- /*-----------------------------------------------------------------*/ 02713000
- /* Function to look up full name in a nicknames file */ 02714000
- /*-----------------------------------------------------------------*/ 02715000
- Namefind: procedure 02716000
- Parse arg userid, node 02717000
- 'STATE' userid() 'NAMES *' 02718000
- if rc=0 then 02719000
- do 02720000
- 'NAMEFIND :USERID' userid ':NODE' node ':NAME (LIFO 1' 02721000
- if rc=0 then 02722000
- parse pull name 02723000
- else 02724000
- name = '' 02725000
- end 02726000
- else 02727000
- name = '' 02728000
- Return name 02729000
- /*-----------------------------------------------------------------*/ 02730000
- /* Routine to handle PFK Edit. */ 02731000
- /*-----------------------------------------------------------------*/ 02732000
- POST_Edit: 02733000
- if Successful then 02734000
- do 02735000
- message='You have successfully sent your file! Please QUIT!' 02736000
- Return 02737000
- end 02738000
- Address COMMAND 'GLOBALV SETL POSTFLAG' flag 02739000
- If Flag='MAIL' then 02740000
- do 02741000
- queue 'In article '||head.M 02742000
- queue head.F||' writes:' 02743000
- queue ' ' 02744000
- queue copies('-',26)||' Original Message '||copies('-',26) 02745000
- queue ' ' 02746000
- end 02747000
- Else If Flag='REPLY' then 02748000
- do 02749000
- queue 'In article '||head.M||' on' 02750000
- queue head.D||' you write:' 02751000
- queue ' ' 02752000
- end 02753000
- Else If Flag='FOLLOWUP' then 02754000
- do 02755000
- queue 'In article '||head.M 02756000
- queue head.F||' writes:' 02757000
- queue ' ' 02758000
- end 02759000
- ADDRESS COMMAND 'XEDIT $POST$ $$NEWS$$ A(PROFILE NNR$NOTE WIDTH 150' 02760000
- Address COMMAND 'SET CMSTYPE HT' 02761000
- Address COMMAND 'EXECIO * DISKR $POST$ $$NEWS$$ A(FINI STEM POSTB.' 02762000
- pbrc=rc 02763000
- Address COMMAND 'SET CMSTYPE RT' 02764000
- if pbrc=0 then 02765000
- do 02766000
- Address COMMAND 'COPY $POST$ $$NEWS$$ A', 02767000
- 'N$N$T$P$ P$O$S$T$ A ( REPLACE ' 02768000
- Address COMMAND 'ERASE $POST$ $$NEWS$$ A' 02769000
- end 02770000
- else 02771000
- message='Your POSTing can not be sent. Please try again' 02772000
- Flag='RESUME' 02773000
- Return 02774000
- /*-----------------------------------------------------------------*/ 02775000
- /* Routine to handle PFK Headers. */ 02776000
- /*-----------------------------------------------------------------*/ 02777000
- Post_Article: 02778000
- if Successful then 02779000
- do 02780000
- message='You have successfully sent your file! Please QUIT!' 02781000
- Return 02782000
- end 02783000
- Address COMMAND 'DESBUF' 02784000
- Call GenHeaders 02785000
- if pbrc=0 then 02786000
- do 02787000
- nntprc=NEWSPost() 02788000
- if word(nntprc,1)^='240' & word(nntprc,1)^='340' then 02789000
- do 02790000
- message=nntprc 02791000
- Return 02792000
- end 02793000
- message=subword(nntprc,2) 02794000
- if index(message,'success')>0 then 02795000
- Successful='1' 02796000
- else 02797000
- Successful='0' 02798000
- end 02799000
- else 02800000
- do 02801000
- Successful='0' 02802000
- message='Your POSTing can not be sent. Please try again' 02803000
- end 02804000
- Return 02805000
- /*-----------------------------------------------------------------*/ 02806000
- /* Routine to handle Mail */ 02807000
- /*-----------------------------------------------------------------*/ 02808000
- Mail_Article: 02809000
- if Successful then 02810000
- do 02811000
- message='You have successfully sent your file! Please QUIT!' 02812000
- Return 02813000
- end 02814000
- Address COMMAND 'DESBUF' 02815000
- Call GenHeaders 02816000
- if pbrc=0 then 02817000
- do 02818000
- header.='' 02819000
- trailer.='' 02820000
- trailer.1='.' 02821000
- trailer.2='QUIT' 02822000
- header.1='HELO '||thisnode 02823000
- header.2='MAIL FROM:<'||userid()||'@'||thisnode||'>' 02824000
- if index(NewHead.T,'(')>0 then 02825000
- rcptpart=word(NewHead.T,1) 02826000
- else if index(NewHead.T,'<')>0 then 02827000
- parse var NewHead.T '<' rcptpart '>' 02828000
- else if index(NewHead.T,'@')>0 then 02829000
- do 02830000
- do i=1 to words(NewHead.T) 02831000
- if index(word(NewHead.T,i),'@')>0 then 02832000
- rcptpart=word(NewHead.T,i) 02833000
- end 02834000
- end 02835000
- else if words(NewHead.T)=1 then 02836000
- rcptpart=NewHead.T 02837000
- else 02838000
- do 02839000
- message='In correct syntax for the "To:" header!' 02840000
- return 02841000
- end 02842000
- header.3='RCPT TO:<'||rcptpart||'>' 02843000
- header.4='DATA' 02844000
- Address COMMAND 'EXECIO 0 CP (STRING DEF 00D AS 02D' 02845000
- Address COMMAND 'EXECIO 0 CP (STRING DEF PUN AS 00D' 02846000
- Address COMMAND 'EXECIO 0 CP (STRING '||, 02847000
- 'SPOOL 00D TO' MAILER 'CONT CLASS M' 02848000
- Address COMMAND 'EXECIO * PUNCH (STEM HEADER.' 02849000
- Address COMMAND 'EXECIO * PUNCH (STEM POSTH.' 02850000
- /* Double periods as per RFC 977 3.10.1 and */ 02851000
- do i=1 to postb.0 /* RFC 821 4.5.2 */ 02852000
- if left(postb.i,1)='.' then 02853000
- Address COMMAND 'EXECIO 1 PUNCH (STRING' '.'postb.i 02854000
- else 02855000
- Address COMMAND 'EXECIO 1 PUNCH (STRING' postb.i 02856000
- end 02857000
- Address COMMAND 'EXECIO * PUNCH (STEM TRAILER.' 02858000
- Address COMMAND 'EXECIO 0 CP (STRING CLOSE 00D NAME '||, 02859000
- userid()||' MAIL' 02860000
- Address COMMAND 'EXECIO 0 CP (STRING DETACH 00D' 02861000
- Address COMMAND 'EXECIO 0 CP (STRING DEF 02D AS 00D' 02862000
- /* Address COMMAND 'ERASE VMNNTP' stamp */ 02863000
- message='Mail Sent' NewHead.T 02864000
- Successful='1' 02865000
- end 02866000
- else 02867000
- do 02868000
- Successful='0' 02869000
- message='Your MAILing can not be sent. Please try again' 02870000
- end 02871000
- Return 02872000
- /*-----------------------------------------------------------------*/ 02873000
- /* Routine to generate headers for post and mail */ 02874000
- /*-----------------------------------------------------------------*/ 02875000
- GenHeaders: 02876000
- posth.='' 02877000
- if Flag='MAIL' | Flag='REPLY' | NewHead.N='' Then 02878000
- do 02879000
- posth.0=6 02880000
- posth.1='From:' NewHead.F 02881000
- posth.2='To:' NewHead.T 02882000
- posth.3='Subject:' NewHead.S 02883000
- posth.4='Date:' NewHead.D 02884000
- posth.5='Organization:' NewHead.O 02885000
- posth.6=' ' 02886000
- end 02887000
- else 02888000
- do 02889000
- posth.0=7 02890000
- if strip(NewHead.R)^='' then 02891000
- do 02892000
- posth.0=8 02893000
- posth.8='References:' NewHead.R 02894000
- end 02895000
- posth.1='From:' NewHead.F 02896000
- posth.2='Path:' NewHead.P 02897000
- posth.3='Newsgroups:' NewHead.N 02898000
- posth.4='Subject:' NewHead.S 02899000
- posth.5='Message-ID:' NewHead.M 02900000
- posth.6='Date:' NewHead.D 02901000
- posth.7='Organization:' NewHead.O 02902000
- end 02903000
- Return 02904000
- NNR$HELP: Procedure 02905000
- /**---------------------------------------------------------------**/ 02906000
- /** Network News Reader **/ 02907000
- /** Help **/ 02908000
- /**---------------------------------------------------------------**/ 02909000
- arg screennum 02910000
- 'Extract /lscreen' 02911000
- 'Set msgline on' lscreen.1-3 '2 overlay' 02912000
- Address COMMAND 'GLOBALV SELECT VMNNTP' 02913000
- Address COMMAND 'GLOBALV GET VERSION' 02914000
- 'SET PF04 ONLY dummy' 02915000
- 'SET PF16 ONLY dummy' 02916000
- flag = 'HELP'; 02917000
- message = ''; 02918000
- start=screennum*18+1 02919000
- if screennum=0 then 02920000
- scrheader='** PHLI/Main Screen' 02921000
- else if screennum=1 then 02922000
- scrheader='** SHLI/Groups Screen' 02923000
- else if screennum=2 then 02924000
- scrheader='** Headers Screen' 02925000
- else if screennum=3 then 02926000
- scrheader='** Post(2) Screen' 02927000
- else if screennum=4 then 02928000
- scrheader='** Post(1) Screen' 02929000
- HELPSCR.='' 02930000
- Address COMMAND 'EXECIO 18 DISKR NNRHELP $XSCREEN *' start, 02931000
- '(FINI STEM HELPSCR.' 02932000
- Address COMMAND 'DESBUF' 02933000
- Do Forever; 02934000
- Call HELPscreen; /* display main menu screen */ 02935000
- 'Read Nochange Tag' 02936000
- 'Extract /cursor' 02937000
- row = cursor.5; col = cursor.6; 02938000
- num=0 02939000
- Do While(Queued()>0) 02940000
- num=num+1 02941000
- Parse Pull QueuedLine.num 02942000
- end 02943000
- do i=1 to num 02944000
- Parse var QueuedLine.i key line column string; 02945000
- if key = "RES" Then Nop 02946000
- else SaveQueued=QueuedLine.i 02947000
- end 02948000
- Parse Var SaveQueued key line column string; 02949000
- Select 02950000
- When key = "CMD" Then Nop 02951000
- When key = "PFK" Then 02952000
- do 02953000
- If Line=1 then Address COMMAND 'HELP CMS NNR' 02954000
- else If Line=3 then call Return_Quit 02955000
- else message='Unsupported PFK' 02956000
- end 02957000
- When key = "ETK" Then Nop; 02958000
- otherwise Nop 02959000
- End 02960000
- If flag='QUIT' then 02961000
- leave 02962000
- End; /* Do Forever */ 02963000
- Return 02964000
- 02965000
- /*-----------------------------------------------------------------*/ 02966000
- /* Routine to display the main menu screen. */ 02967000
- /*-----------------------------------------------------------------*/ 02968000
- HELPscreen: /* set each line of the screen */ 02969000
- 'Set Reserved' 1 'noh' '29'x'! ' '29'x'@', 02970000
- center('*** NNR/VM ('||version||') ***',35), 02971000
- right('Help',25), 02972000
- '29'x'! ' 02973000
- 'Set Reserved' 2 'noh' '29'x'@'||scrheader||'29'x'!' 02974000
- Do i = 3 to 20 02975000
- j=i-2 02976000
- 'Set Reserved' i 'noh' '29'x'!'Left(helpscr.j,78)'29'x'! ' 02977000
- 02978000
- End; 02979000
- Do i = 21 to lscreen.1-4; 02980000
- 'Set Reserved' i 'noh' 02981000
- End; 02982000
- 'Set Reserved' lscreen.1-3 'noh' 02983000
- 'Set Reserved' lscreen.1-2 'high', 02984000
- ' 1= NNR_Help ', 02985000
- ||'2= ', 02986000
- ||'3= Quit ', 02987000
- ||' 4= ', 02988000
- ||' 5= ', 02989000
- ||' 6= ' 02990000
- 'Set Reserved' lscreen.1-1 'high', 02991000
- ' 7= ', 02992000
- ||'8= ', 02993000
- ||'9= ', 02994000
- ||'10= ', 02995000
- ||'11= ', 02996000
- ||'12= ' 02997000
- If message ^= "" Then 02998000
- Do; 02999000
- 'EMSG' message 03000000
- message = ''; 03001000
- End; 03002000
- 'Cursor screen' 15 4 03003000
- Return; 03004000
- /**********************************************************************/03005000
- /* compress bit representation of articles read */03006000
- /**********************************************************************/03007000
- compress_log: procedure 03008000
- parse arg pattern 03009000
- bin='' 03010000
- Pattern=left(pattern||'11111111',((length(pattern)+8)%8)*8) 03011000
- do i=1 to length(pattern) by 4 03012000
- bin=bin||b2h(substr(pattern,i,4)) 03013000
- end 03014000
- return(x2c(bin)) 03015000
- /**********************************************************************/03016000
- /* expand bit representation of articles read */03017000
- /**********************************************************************/03018000
- expand_log: procedure 03019000
- parse arg bin 03020000
- bin=c2x(bin) 03021000
- pattern='' 03022000
- do i=1 to length(bin) 03023000
- pattern=pattern||h2b(substr(bin,i,1)) 03024000
- end 03025000
- return(pattern) 03026000
- /**********************************************************************/03027000
- /* map bit representation of articles read */03028000
- /**********************************************************************/03029000
- Map_Log: procedure expose frst_act log ext_log 03030000
- parse arg article 03031000
- ext_log=overlay('1',ext_log,article-frst_act+1) 03032000
- return(substr(log,article-frst_act+1,1)) 03033000
- /**********************************************************************/03034000
- /* Build representation of articles read */03035000
- /**********************************************************************/03036000
- BldNewLog: procedure expose ext_log prfx. 03037000
- parse arg log 03038000
- ptr=0 03039000
- do i=1 to length(log) 03040000
- if substr(ext_log,i,1) then 03041000
- do 03042000
- ptr=ptr+1 03043000
- if prfx.ptr='*' then 03044000
- log=overlay('1',log,i) 03045000
- else 03046000
- log=overlay('0',log,i) 03047000
- end 03048000
- else 03049000
- do 03050000
- log=overlay('1',log,i) 03051000
- end 03052000
- end 03053000
- if ptr^=prfx.0 then say 'something is wrong with the build new log!' 03054000
- return(log) 03055000
- /**********************************************************************/03056000
- /* convert from hex to binary */03057000
- /**********************************************************************/03058000
- h2b: procedure 03059000
- arg hex 03060000
- select 03061000
- when hex='0' then return('0000') 03062000
- when hex='1' then return('0001') 03063000
- when hex='2' then return('0010') 03064000
- when hex='3' then return('0011') 03065000
- when hex='4' then return('0100') 03066000
- when hex='5' then return('0101') 03067000
- when hex='6' then return('0110') 03068000
- when hex='7' then return('0111') 03069000
- when hex='8' then return('1000') 03070000
- when hex='9' then return('1001') 03071000
- when hex='A' then return('1010') 03072000
- when hex='B' then return('1011') 03073000
- when hex='C' then return('1100') 03074000
- when hex='D' then return('1101') 03075000
- when hex='E' then return('1110') 03076000
- when hex='F' then return('1111') 03077000
- otherwise 03078000
- say 'Oops! error in logic!' 03079000
- end 03080000
- return(-1) 03081000
- /**********************************************************************/03082000
- /* convert form binary to hex */03083000
- /**********************************************************************/03084000
- b2h: procedure 03085000
- arg bin 03086000
- select 03087000
- when bin='0000' then return('0') 03088000
- when bin='0001' then return('1') 03089000
- when bin='0010' then return('2') 03090000
- when bin='0011' then return('3') 03091000
- when bin='0100' then return('4') 03092000
- when bin='0101' then return('5') 03093000
- when bin='0110' then return('6') 03094000
- when bin='0111' then return('7') 03095000
- when bin='1000' then return('8') 03096000
- when bin='1001' then return('9') 03097000
- when bin='1010' then return('A') 03098000
- when bin='1011' then return('B') 03099000
- when bin='1100' then return('C') 03100000
- when bin='1101' then return('D') 03101000
- when bin='1110' then return('E') 03102000
- when bin='1111' then return('F') 03103000
- otherwise 03104000
- say 'Oops! error in logic!' 03105000
- end 03106000
- return(-1) 03107000
- /**********************************************************************/03108000
- /* adjust bit representation of articles read in. */03109000
- /**********************************************************************/03110000
- adjust_inlog: procedure expose frst_rem last_rem frst_act last_act 03111000
- parse arg log 03112000
- if log='' |, 03113000
- frst_rem='' |, 03114000
- verify(frst_rem,'1234567890')>0 |, 03115000
- last_rem='' |, 03116000
- verify(last_rem,'1234567890')>0 then 03117000
- do 03118000
- /* create log (always for ext_log) */ 03119000
- articles=last_act-frst_act+1 03120000
- log=copies('0',articles) 03121000
- frst_rem=frst_act 03122000
- last_rem=last_act 03123000
- return(log) 03124000
- end 03125000
- /* ensure log is in synch with first and last remembered articles */ 03126000
- if last_rem-frst_rem+1 < length(log) then 03127000
- log=substr(log,1,last_rem-frst_rem+1) 03128000
- else 03129000
- log='' 03130000
- 03131000
- if frst_rem>frst_act then 03132000
- do 03133000
- diff=frst_rem-frst_act 03134000
- log=copies('1',diff)||log 03135000
- articles=last_act-frst_act+1 03136000
- log=left(log,articles,'0') 03137000
- frst_rem=frst_act 03138000
- last_rem=last_act 03139000
- end 03140000
- else if frst_rem<frst_act then 03141000
- do 03142000
- /* this could easily happen over time and with articles: */ 03143000
- diff=frst_act-frst_rem+1 03144000
- articles=last_act-frst_act+1 03145000
- log=substr(log,diff) 03146000
- log=left(log,articles,'0') 03147000
- frst_rem=frst_act 03148000
- last_rem=last_act 03149000
- end 03150000
- else 03151000
- do 03152000
- articles=last_act-frst_act+1 03153000
- if articles<0 then articles=0 /* Sigh. It happened. */ 03154000
- log=left(log,articles,'0') 03155000
- frst_rem=frst_act 03156000
- last_rem=last_act 03157000
- end 03158000
- return(log) 03159000
- /**********************************************************************/03160000
- /* adjust bit representation of articles written out. */03161000
- /**********************************************************************/03162000
- adjust_outlog: procedure expose frst_rem last_rem ext_log 03163000
- parse arg log 03164000
- /* forward trim */ 03165000
- ptr=verify(log,'1') 03166000
- if ptr = 1 then 03167000
- nop 03168000
- else if ptr > 1 then 03169000
- do 03170000
- frst_rem=frst_rem+ptr-1 03171000
- log=substr(log,ptr) 03172000
- end 03173000
- else 03174000
- do 03175000
- frst_rem=last_rem 03176000
- log='' 03177000
- end 03178000
- /* backward trim */ 03179000
- if log ^= '' then 03180000
- do 03181000
- ptr=verify(reverse(clean_log(log)),'0') 03182000
- if ptr = 1 then 03183000
- nop 03184000
- else if ptr > 1 then 03185000
- do 03186000
- last_rem=last_rem-ptr+1 03187000
- log=substr(log,1,length(log)-ptr+1) 03188000
- end 03189000
- else 03190000
- do 03191000
- last_rem=frst_rem 03192000
- log='0' 03193000
- end 03194000
- end 03195000
- return(log) 03196000
- /**********************************************************************/03197000
- /* count articles available, remembered range only */03198000
- /**********************************************************************/03199000
- Count_Log: procedure 03200000
- parse arg article_log 03201000
- parse var article_log frst_rem last_rem '$' log '$*$' . 03202000
- count=0 03203000
- log=expand_log(log) 03204000
- do i=1 to length(log) 03205000
- if ^substr(log,i,1) then 03206000
- count=count+1 03207000
- end 03208000
- return(count) 03209000
- /**********************************************************************/03210000
- /* Clear representation of nonexistant articles */03211000
- /* ** trade off between accurate count and amount of space */03212000
- /**********************************************************************/03213000
- Clean_Log: procedure expose ext_log 03214000
- parse arg log 03215000
- if ext_log='' then return(log) 03216000
- ptr=0 03217000
- do i=1 to length(log) 03218000
- if ^substr(ext_log,i,1) then 03219000
- log=overlay('0',log,i) 03220000
- end 03221000
- return(log) 03222000
- /**********************************************************************/03223000
- /* Initialize RXSOCKET */03224000
- /**********************************************************************/03225000
- RXInital:Procedure expose socket 03226000
- parse arg args 03227000
- if Socket('Initialize', 'NNTPConn') = '-1' Then 03228000
- Return('-1 INITIALIZE '||errno) 03229000
- socket = Socket('Socket', 'AF_INET', 'Sock_Stream') 03230000
- If socket="-1" Then 03231000
- Return('-1 SOCKET '||errno) 03232000
- 'GLOBALV SETL SOCKET' socket 03233000
- /*name = AF_INET||Htons(119)||Socket('GetHostByName',word(args,1))*/ 03234000
- name = AF_INET||Htons(119)||Inet_Addr(word(args,1)) 03235000
- rc = Socket('Connect', socket, name) 03236000
- If rc="-1" Then 03237000
- Return('-1 CONNECT '||errno) 03238000
- status=STATUS_Response('') 03239000
- Return(status) 03240000
- /**********************************************************************/03241000
- /* Terminate NEWS Session */03242000
- /**********************************************************************/03243000
- RXTermin:Procedure expose socket 03244000
- If Socket('Close', socket) = '-1' Then 03245000
- Say 'CLOSE '||errno 03246000
- If Socket('Terminate', 'NNTPConn') = '-1' Then 03247000
- Return('-1 TERMINATE '||errno) 03248000
- Return(0) 03249000
- /**********************************************************************/03250000
- /* QUIT the server */03251000
- /**********************************************************************/03252000
- NEWSQuit:Procedure expose socket 03253000
- status=STATUS_Response('QUIT') 03254000
- Return(Status) 03255000
- /**********************************************************************/03256000
- /* Check Status Response (ends with cr lf) */03257000
- /**********************************************************************/03258000
- STATUS_Response: procedure expose socket line 03259000
- parse arg command 03260000
- status=0 03261000
- if command ^='' then 03262000
- status=NEWS_Command(command) 03263000
- If word(Status,1)^='-1' Then 03264000
- do 03265000
- line = "" 03266000
- pattern='0D0A'x 03267000
- Do Forever 03268000
- bytes_in = Socket('Read', socket, 'data') 03269000
- If bytes_in="-1" Then Return('-1 READ '||errno) 03270000
- line = line || data 03271000
- If bytes_in=0 | index(line,pattern)>0 then 03272000
- Leave 03273000
- End 03274000
- Parse Var line data '0D0A'x . 03275000
- Status=A2E(data) 03276000
- End 03277000
- Return(status) 03278000
- /**********************************************************************/03279000
- /* Check TEXT Response (ends with a .) */03280000
- /**********************************************************************/03281000
- TEXT_Response: procedure expose socket line 03282000
- parse arg command 03283000
- Address COMMAND 'GLOBALV GET LINES' 03284000
- status=NEWS_Command(command) 03285000
- If word(Status,1)^='-1' Then 03286000
- do 03287000
- status=0 03288000
- total=0 03289000
- line = "" 03290000
- pattern='0D0A'x||E2A('.')||'0D0A'x 03291000
- Do Forever 03292000
- bytes_in = Socket('Read', socket, 'data') 03293000
- If bytes_in="-1" Then Return('-1 READ '||errno) 03294000
- /* 03295000
- the idea behind line_count is to more accurately assess 03296000
- the line limit. we add 5 for latitude, (nnr$arti) will 03297000
- pick off the 1 or 2 lines extra. remember -1 for status 03298000
- line and -1 for '.'. we will also be off by +-1 because of 03299000
- the way line_count is calculated (words-1). we want to avoid 03300000
- the situation where we approach the limit and append as much 03301000
- as 8k which can "exhaust virtual storage". 03302000
- */ 03303000
- if lines+5 > total then 03304000
- do 03305000
- line_count=words(translate(data,'$ ','400A'x))-1 03306000
- if lines+5 > total+line_count then 03307000
- line = line || data 03308000
- else 03309000
- do 03310000
- i=lines+4-total 03311000
- if i<line_count then 03312000
- do 03313000
- i=wordindex(translate(data,'$ ','400A'x),i) 03314000
- line = line || substr(data,1,i-1) 03315000
- end 03316000
- else 03317000
- line = line || data 03318000
- end 03319000
- total=total+line_count 03320000
- test=right(line||data,5) 03321000
- prevdata=test 03322000
- end 03323000
- else /* exceeded number of lines (approx.) */ 03324000
- do 03325000
- test=right(prevdata||data,5) 03326000
- prevdata=test 03327000
- end 03328000
- If bytes_in=0 | index(test,pattern)>0 then 03329000
- Leave 03330000
- End 03331000
- End 03332000
- Return(status) 03333000
- /**********************************************************************/03334000
- NEWS_Command:Procedure expose socket 03335000
- parse arg command 03336000
- data = E2A(command) || '0D0A'x 03337000
- bytes_out = Socket('Write', socket, data) 03338000
- If bytes_out="-1" Then Return('-1 WRITE '||errno) 03339000
- Return(0) 03340000
- /**********************************************************************/03341000
- /* Check Status */03342000
- /**********************************************************************/03343000
- Check_Status:Procedure expose line 03344000
- Parse Var line data '0D0A'x line 03345000
- Return(A2E(data)) 03346000
- /**********************************************************************/03347000
- /* Split Response Buffer (for articles) */03348000
- /**********************************************************************/03349000
- Split_Article:Procedure expose line 03350000
- Address COMMAND 'GLOBALV GET LINES' 03351000
- Do i=1 to lines+1 03352000
- If line="" Then Leave 03353000
- Parse Var line data '0D0A'x line 03354000
- do while (length(data)>249) 03355000
- Queue left(A2E(data),249)||'FF'x 03356000
- data=substr(data,250) 03357000
- i=i+1 03358000
- End 03359000
- Queue left(A2E(data),max(1,length(data))) 03360000
- End 03361000
- Return 03362000
- /**********************************************************************/03363000
- /* Split Response Buffer */03364000
- /**********************************************************************/03365000
- Split_Response:Procedure expose line item. 03366000
- item.='' 03367000
- i=0 03368000
- Do Forever 03369000
- If line="" Then Leave 03370000
- Parse Var line data '0D0A'x line 03371000
- i=i+1 03372000
- item.i=A2E(data) 03373000
- End 03374000
- item.i='' 03375000
- item.0=i-1 03376000
- Return 03377000
- /**********************************************************************/03378000
- /* Get Subject */03379000
- /**********************************************************************/03380000
- Get_Subject:Procedure expose socket 03381000
- parse arg range 03382000
- status=TEXT_Response('XHDR subject' range'-'range) 03383000
- If word(status,1)='-1' Then Return(Status) 03384000
- Status=Check_Status() 03385000
- if word(Status,1)='221' then 03386000
- do 03387000
- Call Split_Response 03388000
- Return(item.1) 03389000
- End 03390000
- Return(Status) 03391000
- /**********************************************************************/03392000
- /* Get the LIST of Groups */03393000
- /**********************************************************************/03394000
- NEWSList:Procedure expose socket list. 03395000
- status=LISTNGRP_Response('LIST') 03396000
- If word(status,1)^='-1' Then 03397000
- Status=Check_Status() 03398000
- if word(Status,1)='215' then 03399000
- do 03400000
- i=0 03401000
- Do Forever 03402000
- If line="" Then Leave 03403000
- Parse Var line data '0D0A'x line 03404000
- i=i+1 03405000
- list.i=A2E(data) 03406000
- End 03407000
- list.i='' 03408000
- list.0=i-1 03409000
- end 03410000
- Return(Status) 03411000
- /**********************************************************************/03412000
- /* POST article */03413000
- /**********************************************************************/03414000
- NEWSPost:Procedure expose socket posth. postb. 03415000
- status=STATUS_Response('POST') 03416000
- if word(Status,1)='340' then 03417000
- do 03418000
- data='' 03419000
- do i=1 to posth.0 03420000
- data=data||E2A(posth.i)||'0D0A'x 03421000
- end 03422000
- If Socket('Write', socket, data||'0D0A'x)='-1' Then 03423000
- Return('-1 WRITE '||errno) 03424000
- /* Double periods as per RFC 977 3.10.1 and */ 03425000
- do i=1 to postb.0 /* RFC 821 4.5.2 */ 03426000
- if left(postb.i,1)='.' then 03427000
- data=E2A('.'||postb.i)||'0D0A'x 03428000
- else 03429000
- data=E2A(postb.i)||'0D0A'x 03430000
- If Socket('Write', socket, data)='-1' Then 03431000
- Return('-1 WRITE '||errno) 03432000
- end 03433000
- data=E2A('.')||'0D0A'x 03434000
- If Socket('Write', socket, data)='-1' Then 03435000
- Return('-1 WRITE '||errno) 03436000
- status=STATUS_Response('') 03437000
- end 03438000
- Return(Status) 03439000
- /**********************************************************************/03440000
- /* Get the HEADERS for a group */03441000
- /**********************************************************************/03442000
- NEWSXHDR:Procedure expose socket 03443000
- Address COMMAND 'GLOBALV GET XHEADER1' 03444000
- Address COMMAND 'GLOBALV GET XHEADER2' 03445000
- parse arg count start_article group newnews 03446000
- status=STATUS_Response('GROUP '||group) 03447000
- if word(Status,1)='211' then 03448000
- do 03449000
- parse var status . articles first_article last_article . 03450000
- If articles > 0 then 03451000
- do 03452000
- if newnews then 03453000
- do 03454000
- Status=STATUS_Response('STAT '||start_article) 03455000
- if word(Status,1)='223' then 03456000
- do 03457000
- Status=STATUS_Response('NEXT') 03458000
- if word(Status,1)^='223' then Return(0) 03459000
- start_article=word(Status,2) 03460000
- end 03461000
- end 03462000
- first_article=start_article 03463000
- count=count-1 03464000
- if count<last_article-first_article then 03465000
- do 03466000
- first_article=last_article-count 03467000
- range=first_article||'-'||last_article 03468000
- end 03469000
- else 03470000
- range=first_article||'-'||last_article 03471000
- temp.='' /*stk*/03472000
- Status=GetXHeader(range xheader1) /*stk*/03473000
- If word(status,1)='-1' Then Return(Status) /*stk*/03474000
- Status=GetXHeader(range xheader2) /*stk*/03475000
- If word(status,1)='-1' Then Return(Status) /*stk*/03476000
- if word(Status,1)='221' then 03477000
- do /*stk*/03478000
- do i=1 to item.0 /*stk*/03479000
- Queue word(item.i,1) strip(substr(temp.i,2),'T') /*stk*/03480000
- end 03481000
- Push group first_article last_article 03482000
- Queue '.' 03483000
- status=0 03484000
- end 03485000
- drop temp. /*stk*/03486000
- End 03487000
- Else 03488000
- Return(0) 03489000
- End 03490000
- Return(Status) 03491000
- /*stk*/03492000
- /**********************************************************************/03493000
- /* Get the article titles -- append to temp array */03494000
- /**********************************************************************/03495000
- GetXHeader: /*stk*/03496000
- parse arg frange workhead /*stk*/03497000
- delim='4a'x /*stk*/03498000
- do HeaderItem = 1 while workhead<>'' /*stk*/03499000
- parse value workhead with fhd fwid workhead /*stk*/03500000
- if fhd='(ArticleNumber)' then xhd = 'Subject' /*stk*/03501000
- else xhd = fhd /*stk*/03502000
- status=TEXT_Response('XHDR' xhd frange) /*stk*/03503000
- If word(status,1)='-1' Then Return(Status) /*stk*/03504000
- Status=Check_Status() /*stk*/03505000
- if word(Status,1)='221' then /*stk*/03506000
- do /*stk*/03507000
- call Split_Response /*stk*/03508000
- do i=1 to item.0 /*stk*/03509000
- temphead = subword(item.i,2) /*stk*/03510000
- if fhd='(ArticleNumber)' then /*stk*/03511000
- temphead = right(word(item.i,1),fwid) /*stk*/03512000
- temphead = translate(temphead,'&&','4a29'x) /*stk*/03513000
- temp.i=temp.i||delim||left(temphead,fwid) /*stk*/03514000
- end /*stk*/03515000
- end /*stk*/03516000
- delim = ' ' /*stk*/03517000
- end HeaderItem /*stk*/03518000
- return(STatus) /*stk*/03519000
- /*stk*/03520000
- /*stk*/03521000
- /**********************************************************************/03522000
- /* Get the LIST of New Groups */03523000
- /**********************************************************************/03524000
- NEWSNewG:Procedure expose socket item. 03525000
- parse arg hhmmss yymmdd 03526000
- status=TEXT_Response('NEWGROUPS ' yymmdd hhmmss) 03527000
- If word(status,1)^='-1' Then 03528000
- Status=Check_Status() 03529000
- If word(status,1)='231' Then 03530000
- Call Split_Response 03531000
- Return(Status) 03532000
- /**********************************************************************/03533000
- /* Check LIST and NEWGROUPS commands (status + text response) */03534000
- /**********************************************************************/03535000
- LISTNGRP_Response: procedure expose socket line 03536000
- parse arg command 03537000
- status=NEWS_Command(command) 03538000
- If word(Status,1)^='-1' Then 03539000
- do 03540000
- status=0 03541000
- line = "" 03542000
- pattern='0D0A'x 03543000
- Do Forever 03544000
- bytes_in = Socket('Read', socket, 'data') 03545000
- If bytes_in="-1" Then Return('-1 READ '||errno) 03546000
- line = line || data 03547000
- If bytes_in=0 | index(line,pattern)>0 then 03548000
- Leave 03549000
- End 03550000
- Parse Var line status '0D0A'x . 03551000
- Status=A2E(status) 03552000
- If word(Status,1)^='231' & word(Status,1)^='215' Then 03553000
- Return(status) 03554000
- pattern='0D0A'x||E2A('.')||'0D0A'x 03555000
- If index(line,pattern)>0 then 03556000
- Return(status) 03557000
- prevdata=data 03558000
- Do Forever 03559000
- bytes_in = Socket('Read', socket, 'data') 03560000
- If bytes_in="-1" Then Return('-1 READ '||errno) 03561000
- line = line || data 03562000
- test=right(line,5) 03563000
- prevdata=data 03564000
- If bytes_in=0 | index(test,pattern)>0 then 03565000
- Leave 03566000
- End 03567000
- End 03568000
- Return(status) 03569000
- /**********************************************************************/03570000
- /* Get Selected articles */03571000
- /**********************************************************************/03572000
- NEWSSeleS:Procedure expose socket Selected_Articles. 03573000
- parse arg action group start_article newnews 03574000
- status=STATUS_Response('GROUP '||group) 03575000
- if word(Status,1)='211' then 03576000
- do 03577000
- parse var status . articles first_article last_article . 03578000
- If articles > 0 then 03579000
- do 03580000
- do i=1 to Selected_Articles.0 03581000
- if Start_Article=word(Selected_Articles.i,1) then 03582000
- do 03583000
- ptr=i 03584000
- leave 03585000
- end 03586000
- end 03587000
- Address COMMAND 'GLOBALV GET FARTICLE' 03588000
- Address COMMAND 'GLOBALV GET LARTICLE' 03589000
- if FArticle=0 then 03590000
- do 03591000
- FArticle=ptr 03592000
- LArticle=ptr 03593000
- end 03594000
- SaveArticle=word(Selected_Articles.ptr,1) 03595000
- do while ((ptr > 0) & (ptr <= Selected_Articles.0)) 03596000
- if SaveArticle < Selected_Articles.ptr then 03597000
- SaveArticle=word(Selected_Articles.ptr,1) 03598000
- if LArticle < ptr then LArticle=ptr 03599000
- if FArticle > ptr then FArticle=ptr 03600000
- Address COMMAND 'GLOBALV SET HEADERS' Action 03601000
- Address COMMAND 'GLOBALV SETL SUBJECT', 03602000
- Get_Subject(word(Selected_Articles.ptr,1)) 03603000
- status=TEXT_Response(Action word(Selected_Articles.ptr,1)) 03604000
- If word(status,1)='-1' Then Return(Status) 03605000
- Status=Check_Status() 03606000
- Call Split_Article 03607000
- Push group 03608000
- Address COMMAND 'XEDIT $A$R$T$I XEDIT S', 03609000
- '(PROFILE NNR$ARTI WIDTH 300' 03610000
- Pull command 03611000
- if index('QUIT POST',command) > 0 then ptr=0 03612000
- else if command='NEXT' then ptr=ptr+1 03613000
- else if command='LAST' then ptr=ptr-1 03614000
- else if command='HEADBODY' then 03615000
- do 03616000
- if Action='ARTICLE' then Action='BODY' 03617000
- else Action='ARTICLE' 03618000
- end 03619000
- end 03620000
- if index('POST',command) > 0 then 03621000
- do 03622000
- Address COMMAND 'GLOBALV SET ARTICLE' word(Status,2) 03623000
- Address COMMAND 'GLOBALV SET POSTING' 1 03624000
- status=TEXT_Response('HEAD ' word(Status,2)) 03625000
- If word(status,1)='-1' Then Return(Status) 03626000
- Status=Check_Status() 03627000
- Call Split_Article 03628000
- end 03629000
- else 03630000
- do 03631000
- Address COMMAND 'GLOBALV SET ARTICLE' SaveArticle 03632000
- end 03633000
- Address COMMAND 'GLOBALV SET FARTICLE' FArticle 03634000
- Address COMMAND 'GLOBALV SET LARTICLE' LArticle 03635000
- Address COMMAND 'GLOBALV SET HEADERS' Action 03636000
- Status=0 03637000
- End 03638000
- Else 03639000
- Return(0) /* no articles */ 03640000
- End 03641000
- Return(Status) 03642000
- /**********************************************************************/03643000
- /* Get Selected articles */03644000
- /**********************************************************************/03645000
- NEWSSeleI:Procedure expose socket item. 03646000
- parse arg action group start_article newnews 03647000
- status=STATUS_Response('GROUP '||group) 03648000
- if word(Status,1)='211' then 03649000
- do 03650000
- parse var status . articles first_article last_article . 03651000
- If articles > 0 then 03652000
- do 03653000
- do i=1 to item.0 03654000
- if Start_Article=word(item.i,1) then 03655000
- do 03656000
- ptr=i 03657000
- leave 03658000
- end 03659000
- end 03660000
- Address COMMAND 'GLOBALV GET FARTICLE' 03661000
- Address COMMAND 'GLOBALV GET LARTICLE' 03662000
- if FArticle=0 then 03663000
- do 03664000
- FArticle=ptr 03665000
- LArticle=ptr 03666000
- end 03667000
- SaveArticle=word(item.ptr,1) 03668000
- do while ((ptr > 0) & (ptr <= item.0)) 03669000
- if SaveArticle < item.ptr then SaveArticle=word(item.ptr,1) 03670000
- if LArticle < ptr then LArticle=ptr 03671000
- if FArticle > ptr then FArticle=ptr 03672000
- Address COMMAND 'GLOBALV SET HEADERS' Action 03673000
- Address COMMAND 'GLOBALV SETL SUBJECT', 03674000
- Get_Subject(word(item.ptr,1)) 03675000
- status=TEXT_Response(Action word(item.ptr,1)) 03676000
- If word(status,1)='-1' Then Return(Status) 03677000
- Status=Check_Status() 03678000
- Call Split_Article 03679000
- Push group 03680000
- Address COMMAND 'XEDIT $A$R$T$I XEDIT S', 03681000
- '(PROFILE NNR$ARTI WIDTH 300' 03682000
- Pull command 03683000
- if index('QUIT POST',command) > 0 then ptr=0 03684000
- else if command='NEXT' then ptr=ptr+1 03685000
- else if command='LAST' then ptr=ptr-1 03686000
- else if command='HEADBODY' then 03687000
- do 03688000
- if Action='ARTICLE' then Action='BODY' 03689000
- else Action='ARTICLE' 03690000
- end 03691000
- end 03692000
- if index('POST',command) > 0 then 03693000
- do 03694000
- Address COMMAND 'GLOBALV SET ARTICLE' word(Status,2) 03695000
- Address COMMAND 'GLOBALV SET POSTING' 1 03696000
- status=TEXT_Response('HEAD ' word(Status,2)) 03697000
- If word(status,1)='-1' Then Return(Status) 03698000
- Status=Check_Status() 03699000
- Call Split_Article 03700000
- end 03701000
- else 03702000
- do 03703000
- Address COMMAND 'GLOBALV SET ARTICLE' SaveArticle 03704000
- end 03705000
- Address COMMAND 'GLOBALV SET FARTICLE' FArticle 03706000
- Address COMMAND 'GLOBALV SET LARTICLE' LArticle 03707000
- Address COMMAND 'GLOBALV SET HEADERS' Action 03708000
- Status=0 03709000
- End 03710000
- End 03711000
- Return(Status) 03712000
- /**********************************************************************/03713000
- /* Get Articles */03714000
- /**********************************************************************/03715000
- NEWSArti:Procedure expose socket item. 03716000
- parse arg Action group start_article newnews 03717000
- status=STATUS_Response('GROUP' group) 03718000
- if word(Status,1)='211' then 03719000
- do 03720000
- parse var status . articles first_article last_article . 03721000
- Address COMMAND 'GLOBALV SET FRST_ACT' first_article 03722000
- Address COMMAND 'GLOBALV SET LAST_ACT' last_article 03723000
- If articles > 0 then 03724000
- do 03725000
- if newnews then 03726000
- do 03727000
- Status=STATUS_Response('STAT '||start_article) 03728000
- if word(Status,1)='223' then 03729000
- do 03730000
- Status=STATUS_Response('NEXT') 03731000
- if word(Status,1)^='223' then Return(0) 03732000
- start_article=word(Status,2) 03733000
- end 03734000
- end 03735000
- if start_article=0 then start_article='' 03736000
- Status=STATUS_Response('STAT '||start_article) 03737000
- if word(Status,1)='423' then 03738000
- do 03739000
- if Start_Article > First_Article Then 03740000
- First_Article=Start_Article 03741000
- do i=First_Article to Last_Article 03742000
- Status=STATUS_Response('STAT '||i) 03743000
- start_article=word(Status,2) 03744000
- if word(Status,1)='223' then Leave 03745000
- end 03746000
- end 03747000
- if word(Status,1)^='223' then Return(0) 03748000
- SaveArticle=start_article 03749000
- BackArticle=start_article 03750000
- status=TEXT_Response(Action start_article) 03751000
- If word(status,1)='-1' Then Return(Status) 03752000
- Status=Check_Status() 03753000
- Call Split_Article 03754000
- Push group 03755000
- Address COMMAND 'GLOBALV SET HEADERS' Action 03756000
- Address COMMAND 'GLOBALV SETL SUBJECT', 03757000
- Get_Subject(word(Status,2)) 03758000
- Address COMMAND 'XEDIT $A$R$T$I XEDIT S', 03759000
- '(PROFILE NNR$ARTI WIDTH 300' 03760000
- Pull command 03761000
- do Forever 03762000
- if command='NEXT' then 03763000
- Status=STATUS_Response('NEXT') 03764000
- else if command='LAST' then 03765000
- Status=STATUS_Response('LAST') 03766000
- else if command='HEADBODY' then 03767000
- do 03768000
- if Action='ARTICLE' then Action='BODY' 03769000
- else Action='ARTICLE' 03770000
- Status='223 '||word(status,2) 03771000
- end 03772000
- if word(Status,1)='223' then 03773000
- do 03774000
- status=TEXT_Response(Action word(Status,2)) 03775000
- If word(status,1)='-1' Then Return(Status) 03776000
- Status=Check_Status() 03777000
- if SaveArticle < word(Status,2) then 03778000
- SaveArticle=word(Status,2) 03779000
- else if BackArticle > word(Status,2) then 03780000
- BackArticle=word(Status,2) 03781000
- Address COMMAND 'GLOBALV SET HEADERS' Action 03782000
- Address COMMAND 'GLOBALV SETL SUBJECT', 03783000
- Get_Subject(word(Status,2)) 03784000
- Call Split_Article 03785000
- Push group 03786000
- Address COMMAND 'XEDIT $A$R$T$I XEDIT S', 03787000
- '(PROFILE NNR$ARTI WIDTH 300' 03788000
- Pull command 03789000
- end 03790000
- if word(Status,1)^='220' & word(Status,1)^='222' then 03791000
- Leave 03792000
- if index('QUIT POST',command)>0 then 03793000
- Leave 03794000
- end 03795000
- if index('POST',command) > 0 then 03796000
- do 03797000
- Address COMMAND 'GLOBALV SET ARTICLE' word(Status,2) 03798000
- Address COMMAND 'GLOBALV SET POSTING' 1 03799000
- status=TEXT_Response('HEAD' word(Status,2)) 03800000
- If word(status,1)='-1' Then Return(Status) 03801000
- Status=Check_Status() 03802000
- Call Split_Article 03803000
- end 03804000
- else 03805000
- do 03806000
- Status=STATUS_Response('NEXT') 03807000
- if word(Status,1)='223' then 03808000
- Address COMMAND 'GLOBALV SET NEXT_ACT' word(Status,2) 03809000
- Address COMMAND 'GLOBALV SET ARTICLE' SaveArticle 03810000
- Address COMMAND 'GLOBALV SET BACKART' BackArticle 03811000
- end 03812000
- Address COMMAND 'GLOBALV SET HEADERS' Action 03813000
- Status=0 03814000
- End 03815000
- Else 03816000
- Return(0) /* no articles */ 03817000
- End 03818000
- Return(Status) 03819000
- /**********************************************************************/03820000
- /* A2E EXEC simple ascii to ebcdic translate by JCA */03821000
- /**********************************************************************/03822000
- A2E: 03823000
- return translate(arg(1), , 03824000
- '00010203372D2E2F1605150B0C0D0E0F'x||, 03825000
- '101112133C3D322618193F27221D351F'x||, 03826000
- '405A7F7B5B6C507D4D5D5C4E6B604B61'x||, 03827000
- 'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'x||, 03828000
- '7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'x||, 03829000
- 'D7D8D9E2E3E4E5E6E7E8E9ADE0BD5F6D'x||, 03830000
- '79818283848586878889919293949596'x||, 03831000
- '979899A2A3A4A5A6A7A8A9C04FD0A107'x||, 03832000
- '00010203372D2E2F1605250B0C0D0E0F'x||, 03833000
- '101112133C3D322618193F27221D351F'x||, 03834000
- '405A7F7B5B6C507D4D5D5C4E6B604B61'x||, 03835000
- 'F0F1F2F3F4F5F6F7F8F97A5E4C7E6E6F'x||, 03836000
- '7CC1C2C3C4C5C6C7C8C9D1D2D3D4D5D6'x||, 03837000
- 'D7D8D9E2E3E4E5E6E7E8E9ADE0BD5F6D'x||, 03838000
- '79818283848586878889919293949596'x||, 03839000
- '979899A2A3A4A5A6A7A8A9C04FD0A107'x) 03840000
- /**********************************************************************/03841000
- /* E2A EXEC simple ebcdic to ascii translate by JCA */03842000
- /**********************************************************************/03843000
- E2A: 03844000
- return translate(arg(1), , 03845000
- '000102031A091A7F1A1A1A0B0C0D0E0F'x||, 03846000
- '101112131A0A081A18191A1A1C1D1E1F'x||, 03847000
- '1A1A1C1A1A0A171B1A1A1A1A1A050607'x||, 03848000
- '1A1A161A1A1E1A041A1A1A1A14151A1A'x||, 03849000
- '20A6E180EB909FE2AB8B9B2E3C282B7C'x||, 03850000
- '26A9AA9CDBA599E3A89E21242A293B5E'x||, 03851000
- '2D2FDFDC9ADDDE989DACBA2C255F3E3F'x||, 03852000
- 'D78894B0B1B2FCD6FB603A2340273D22'x||, 03853000
- 'F861626364656667686996A4F3AFAEC5'x||, 03854000
- '8C6A6B6C6D6E6F7071729787CE93F1FE'x||, 03855000
- 'C87E737475767778797AEFC0DA5BF2F9'x||, 03856000
- 'B5B6FDB7B8B9E6BBBCBD8DD9BF5DD8C4'x||, 03857000
- '7B414243444546474849CBCABEE8ECED'x||, 03858000
- '7D4A4B4C4D4E4F505152A1ADF5F4A38F'x||, 03859000
- '5CE7535455565758595AA0858EE9E4D1'x||, 03860000
- '30313233343536373839B3F7F0FAA7FF'x) 03861000
- :READ NNR$PREF $XEDIT D2 NNR130 05/09/92 14:09:10
- /**------------------------------------------------------------------**/00001000
- /** Network News Reader **/00002000
- /** User Preferences **/00003000
- /**------------------------------------------------------------------**/00004000
- /*====================== NNR$PREF HISTORY ============================*/00005000
- /* 12/21/91 Created */00006000
- /* 12/29/91 added header preferences */00007000
- /* 01/28/92 * *_1.2.2c */00008000
- /* * add novalue routines (for compile) */00009000
- /* 03/31/92 * *_1.2.2d */00010000
- /* * add multiple personal subscriptions */00011000
- /* * fix from GILMART@lstc2vm.stortek.com (preferences hook) */00012000
- /* 05/09/92 * *_1.2.2e */00013000
- /*=========================== HISTORY ================================*/00014000
- /** 00015000
- Copyright (C) 1991 Paul J. Campbell 00016000
- 00017000
- This program is free software; you can redistribute it and/or modify00018000
- it under the terms of the MITRE Corporation General Public License a00019000
- published by the MITRE Corporation 00020000
- 00021000
- This program is distributed in the hope that it will be useful, 00022000
- but WITHOUT ANY WARRANTY; without even the implied warranty of 00023000
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024000
- MITRE General Public License for more details. 00025000
- 00026000
- You should have received a copy of the MITRE General Public License 00027000
- along with this program; if not, write to the MITRE Corporation. 00028000
- 00029000
- **/ 00030000
- signal on novalue 00031000
- trace('N') 00032000
- Address xedit 00033000
- 'Set ctlchar % escape' 00034000
- 'Set ctlchar @ protect red high' 00035000
- 'Set ctlchar' '4a'x 'protect yellow high' 00036000
- 'Set ctlchar ! protect blue nohigh' 00037000
- 'Set ctlchar $ noprotect turq high' 00038000
- 'Set ctlchar * noprotect white nohigh' 00039000
- 'Set ctlchar & protect pink nohigh' 00040000
- 'Set ctlchar ^ protect green nohigh' 00041000
- 'Extract /lscreen' 00042000
- 'Set msgline on' lscreen.1-3 2 'overlay' 00043000
- 'Set CMDline BOTTOM' 00044000
- 'SET CURLINE ON 3' 00045000
- 'SET PREFIX OFF' 00046000
- 'SET SCALE OFF' 00047000
- 'SET LINEND OFF' 00048000
- 'SET PF04 ONLY dummy' 00049000
- 'SET PF16 ONLY dummy' 00050000
- Address COMMAND 'GLOBALV SELECT VMNNTP' 00051000
- Address COMMAND 'GLOBALV GET VERSION' 00052000
- Address COMMAND 'GLOBALV GET NUMBER' 00053000
- Address COMMAND 'GLOBALV GET LINES' 00054000
- Address COMMAND 'GLOBALV GET LOGPOSTS' 00055000
- Address COMMAND 'GLOBALV GET XHEADER2' 00056000
- parse value xheader2 with xheader2 . 00057000
- Address COMMAND 'GLOBALV GET CURRHLIQ' 00058000
- if LogPosts then logpm='YES' 00059000
- else logpm='NO' 00060000
- message = '' 00061000
- flag = 'PREF'; 00062000
- row=lscreen.1; col=7 00063000
- Address COMMAND 'DESBUF' 00064000
- Do Forever 00065000
- Call UPrefScreen 00066000
- 'Read Nochange Tag' 00067000
- 'Extract /cursor' 00068000
- row = cursor.5; col = cursor.6 00069000
- num=0 00070000
- Do While(Queued()>0) 00071000
- num=num+1 00072000
- Parse Pull QueuedLine.num 00073000
- end 00074000
- do i=1 to num 00075000
- Parse var QueuedLine.i key line column string; 00076000
- if key = "RES" Then Call UPREF('Reserved') 00077000
- else SaveQueued=QueuedLine.i 00078000
- end 00079000
- Parse Var SaveQueued key line column string; 00080000
- Select 00081000
- When key = "CMD" Then Call UPREF('CommandLine') 00082000
- When key = "PFK" Then Call UPREF('PFKeys') 00083000
- When key = "ETK" Then Call Cursor 00084000
- otherwise Nop 00085000
- End 00086000
- If flag='QUIT' then 00087000
- leave 00088000
- End 00089000
- Address COMMAND 'GLOBALV SETL NUMBER' number 00090000
- Address COMMAND 'GLOBALV SETL LINES' lines 00091000
- Address COMMAND 'GLOBALV SETL LOGPOSTS' find(logpm,'YES') 00092000
- Address COMMAND 'GLOBALV SETL XHEADER2' xheader2 '99' 00093000
- Address COMMAND 'GLOBALV SETL CURRHLIQ' currhliq 00094000
- Address COMMAND 'DESBUF' 00095000
- 'QQUIT' 00096000
- Exit 00097000
- /*-----------------------------------------------------------------*/ 00098000
- /* Routine Handle signal novalue */ 00099000
- /*-----------------------------------------------------------------*/ 00100000
- NOVALUE: 00101000
- parse source . . myname . 00102000
- say "NOVALUE error in" myname "line" sigl":" 00103000
- say "Source line>" sourceline(sigl) 00104000
- 'QQUIT' 00105000
- exit(999) 00106000
- /*-----------------------------------------------------------------*/ 00107000
- /* Routine to handle reserved lines. */ 00108000
- /*-----------------------------------------------------------------*/ 00109000
- UPREF: 00110000
- parse arg action 00111000
- if action='Reserved' then 00112000
- do 00113000
- string=strip(string) 00114000
- if line = 8 Then 00115000
- do 00116000
- Message=string||' is not numeric!' 00117000
- if verify(string,'0123456789')^=0 then Return 00118000
- Message='Zero is not a vaild value (must be greater than 0)!' 00119000
- if string=0 then Return 00120000
- number=string 00121000
- Message=string||' is an acceptable value for the number', 00122000
- 'of Articles/Group!' 00123000
- end 00124000
- else if line = 10 Then 00125000
- do 00126000
- Message=string||' is not numeric!' 00127000
- if verify(string,'0123456789')^=0 then Return 00128000
- Message='Zero is not a vaild value (must be greater than 0)!' 00129000
- if string=0 then Return 00130000
- lines=string 00131000
- Message=string||' is an acceptable value for the number', 00132000
- 'of Lines/Article!' 00133000
- end 00134000
- else if line = 12 Then 00135000
- do 00136000
- if translate(string)='YES' | translate(string)='NO' then 00137000
- do 00138000
- logpm=translate(string) 00139000
- Message=string||' is an acceptable value for LOGing' 00140000
- end 00141000
- else 00142000
- do 00143000
- Message=string||' is NOT an acceptable value for LOGing' 00144000
- end 00145000
- end 00146000
- else if line = 14 Then 00147000
- do 00148000
- permit='ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._' 00149000
- if verify(translate(string),permit)=0 then 00150000
- do 00151000
- if strip(string)='Subscriptions' then 00152000
- Message=string||' NOT acceptable, try another name.' 00153000
- else 00154000
- do 00155000
- currhliq=strip(string) 00156000
- Message=string||' is an acceptable value for HLIQ' 00157000
- end 00158000
- end 00159000
- else 00160000
- do 00161000
- Message=string||' NOT acceptable, use "'||permit||'"!' 00162000
- end 00163000
- end 00164000
- end 00165000
- Else If action='CommandLine' then 00166000
- do 00167000
- line=translate(line) 00168000
- If (Abbrev('QQUIT',line,2) | line = 'QUIT') Then 00169000
- Do 00170000
- Flag = 'QUIT' /* clear stack */ 00171000
- End 00172000
- Else 00173000
- message = 'Unsupported command:' line column string 00174000
- End 00175000
- Else If action='PFKeys' then 00176000
- do 00177000
- Call PFKmap 00178000
- If Line=1 then Call NNR$HELP 00179000
- else If Line=3 then flag= 'QUIT' 00180000
- else If Line=12 then Call Rotate 00181000
- else message='Unsupported PFK' 00182000
- End 00183000
- Return 00184000
- /*-----------------------------------------------------------------*/ 00185000
- /* Routine to display the 2nd post menu screen. */ 00186000
- /*-----------------------------------------------------------------*/ 00187000
- UPrefScreen: 00188000
- 'Set Reserved 1 noh' '%! %@', 00189000
- center('*** NNR/VM ('||version||') ***',35), 00190000
- right('User Preferences',25), 00191000
- '%! ' 00192000
- 'Set Reserved 2 noh' 00193000
- 'Set Reserved 3 noh' 00194000
- 'Set Reserved 4 noh' 00195000
- 'Set Reserved 5 noh' 00196000
- 'Set Reserved 6 noh', 00197000
- '%@ Use PF12 to Rotate value for Header Screen display:%*'||, 00198000
- Left(Xheader2,20)'%!' 00199000
- 'Set Reserved 7 noh' 00200000
- 'Set Reserved 8 noh', 00201000
- '%@ Maximum number of Articles/Group(300):%*'||, 00202000
- Right(Number,3)'%!' 00203000
- 'Set Reserved 9 noh' 00204000
- 'Set Reserved 10 noh', 00205000
- '%@ Maximum number of Lines/Article(1500):%*'||, 00206000
- Right(Lines,4)'%!' 00207000
- 'Set Reserved 11 noh' 00208000
- 'Set Reserved 12 noh', 00209000
- '%@ Log outgoing POSTings and MAIL(YES/NO):%*'||, 00210000
- Right(logpm,3)'%!' 00211000
- 'Set Reserved 13 noh' 00212000
- 'Set Reserved 14 noh', 00213000
- '%@ Set Current Personal HLI Qualifier (OFF):%*'||, 00214000
- Left(currhliq,16)'%!' 00215000
- Do scrpos=15 to lscreen.1-4 00216000
- 'Set Reserved' scrpos 'noh' 00217000
- End 00218000
- 'Set Reserved' lscreen.1-3 'noh' 00219000
- 'Set Reserved' lscreen.1-2 'high', 00220000
- ' 1= Help ', 00221000
- ||'2= ', 00222000
- ||'3= Quit ', 00223000
- ||' 4= ', 00224000
- ||' 5= ', 00225000
- ||' 6= ' 00226000
- 'Set Reserved' lscreen.1-1 'high', 00227000
- ' 7= ', 00228000
- ||'8= ', 00229000
- ||'9= ', 00230000
- ||'10= ', 00231000
- ||'11= ', 00232000
- ||'12= Rotate ' 00233000
- If message ^= "" Then 00234000
- Do 00235000
- 'EMSG' message 00236000
- message = '' 00237000
- End; 00238000
- 'Cursor screen' row col 00239000
- Return 00240000
- /*-----------------------------------------------------------------*/ 00241000
- /* Routine to handle PFK Mapping. */ 00242000
- /*-----------------------------------------------------------------*/ 00243000
- PFKmap: 00244000
- if line>12 then line=line-12 00245000
- Return 00246000
- /*-----------------------------------------------------------------*/ 00247000
- /* Routine to handle rotation through variable */ 00248000
- /*-----------------------------------------------------------------*/ 00249000
- Rotate: 00250000
- xhdr2='Subject Message-ID Keywords Date Newsgroups From' 00251000
- xhdr2=xhdr2||' Organization Lines Sender' 00252000
- 'Extract /cursor' 00253000
- if cursor.5 = 6 then 00254000
- do 00255000
- if index(xhdr2,xheader2)=0 then 00256000
- do 00257000
- message='Header value "'xheader2'" is not in our list!' 00258000
- xheader2='Subject' 00259000
- Return 00260000
- end 00261000
- /* vm/sp 6 has wordpos but we can not use it (yet) */ 00262000
- do i=1 to words(xhdr2) 00263000
- if xheader2=word(xhdr2,i) then 00264000
- leave 00265000
- end 00266000
- if i=words(xhdr2) then 00267000
- xheader2=word(xhdr2,1) 00268000
- else 00269000
- xheader2=word(xhdr2,i+1) 00270000
- end 00271000
- else 00272000
- message='Value "Rotation" is not possible here!' 00273000
- Return 00274000
- /*-----------------------------------------------------------------*/ 00275000
- /* Routine to handle the enter key (cursor movement) */ 00276000
- /*-----------------------------------------------------------------*/ 00277000
- Cursor: 00278000
- 'CURSOR HOME' 00279000
- 'EXTRACT /CURSOR/' 00280000
- row=cursor.1 00281000
- col=cursor.2 00282000
- Return 00283000
- NNR$HELP: Procedure 00284000
- /**---------------------------------------------------------------**/ 00285000
- /** Network News Reader **/ 00286000
- /** Help **/ 00287000
- /**---------------------------------------------------------------**/ 00288000
- 'Extract /lscreen' 00289000
- 'Set msgline on' lscreen.1-3 '2 overlay' 00290000
- Address COMMAND 'GLOBALV SELECT VMNNTP' 00291000
- Address COMMAND 'GLOBALV GET VERSION' 00292000
- 'SET PF04 ONLY dummy' 00293000
- 'SET PF16 ONLY dummy' 00294000
- message = ''; 00295000
- start=6*18+1 00296000
- scrheader='** User Preferences Screen' 00297000
- helpscr.='' 00298000
- Address COMMAND 'EXECIO 18 DISKR NNRHELP $XSCREEN *', 00299000
- start '(FINI STEM HELPSCR.' 00300000
- Address COMMAND 'DESBUF' 00301000
- Do Forever; 00302000
- Call HELPscreen 00303000
- 'Read Nochange Tag' 00304000
- 'Extract /cursor' 00305000
- row = cursor.5; col = cursor.6 00306000
- num=0 00307000
- Do While(Queued()>0) 00308000
- num=num+1 00309000
- Parse Pull QueuedLine.num 00310000
- end 00311000
- do i=1 to num 00312000
- Parse var QueuedLine.i key line column string; 00313000
- if key = "RES" Then Nop 00314000
- else SaveQueued=QueuedLine.i 00315000
- end 00316000
- Parse Var SaveQueued key line column string; 00317000
- Select 00318000
- When key = "CMD" Then Nop 00319000
- When key = "PFK" Then 00320000
- do 00321000
- If Line=1 then Address COMMAND 'HELP CMS NNR' 00322000
- else If Line=3 then 00323000
- do 00324000
- Do i = 3 to 20 00325000
- 'Set Reserved' i 'off' 00326000
- End 00327000
- Return 00328000
- End 00329000
- else message='Unsupported PFK' 00330000
- end 00331000
- When key = "ETK" Then Nop; 00332000
- otherwise Nop 00333000
- End 00334000
- End /* Do Forever */ 00335000
- Return 00336000
- 00337000
- /*-----------------------------------------------------------------*/ 00338000
- /* Routine to display the main menu screen. */ 00339000
- /*-----------------------------------------------------------------*/ 00340000
- HELPscreen: /* set each line of the screen */ 00341000
- 'Set Reserved 1 noh' '%! %@', 00342000
- center('*** NNR/VM ('||version||') ***',35), 00343000
- right('Help',25), 00344000
- '%! ' 00345000
- 'Set Reserved 2 noh' '%@'||scrheader||'%!' 00346000
- Do i = 3 to 20 00347000
- j=i-2 00348000
- 'Set Reserved' i 'noh' '%!'Left(helpscr.j,78)'%! ' 00349000
- End; 00350000
- Do i = 21 to lscreen.1-4; 00351000
- 'Set Reserved' i 'noh' 00352000
- End; 00353000
- 'Set Reserved' lscreen.1-3 'Noh' 00354000
- 'Set Reserved' lscreen.1-2 'high', 00355000
- ' 1= NNR_Help ', 00356000
- ||'2= ', 00357000
- ||'3= Quit ', 00358000
- ||' 4= ', 00359000
- ||' 5= ', 00360000
- ||' 6= ' 00361000
- 'Set Reserved' lscreen.1-1 'high', 00362000
- ' 7= ', 00363000
- ||'8= ', 00364000
- ||'9= ', 00365000
- ||'10= ', 00366000
- ||'11= ', 00367000
- ||'12= ' 00368000
- If message ^= "" Then 00369000
- Do 00370000
- 'EMSG' message 00371000
- message = '' 00372000
- End; 00373000
- 'Cursor screen' 15 4 00374000
- Return 00375000
- :READ NNR HELPCMS D1 NNR130 05/10/92 14:41:59
- .cm NNR HELPCMS
- .fo off
- .cs 1 on
- NNR - INVOKE Network News Reader
-
- .cs 1 off
- .cs 2 on
- The format of the NNR command is:
-
- +------+------------------------------------------------------- +
- | | |
- | NNR | << Argument > ( Options > |
- | | |
- | | Where the argument may be a single news group |
- | | in the form "News.Group.Ext" or "p_s" which |
- | | delivers you to your Personal_Subscriptions. |
- | | |
- | | Where the options are: |
- | | |
- | | + + defaults: |
- | | | ARTICLES nnn | 300 |
- | | | HEADERS YES/NO| yes |
- | | | NEWS ALL/NEW| new |
- | | | DAYSBACK nn | 7 |
- | | | LINES nnnn | 1500 |
- | | | LOG/NOLOG | log |
- | | | POST | N/A |
- | | | IPADDR addr | System Default |
- | | + + |
- | | |
- +------+---------------------------------------------------------+
-
- .cs 2 off
- .cs 3 on
-
- NNR PARAMETERS
-
- NNR will take a news group as an argument.
-
- GENERAL NNR OPTIONS
-
- The following options are available to all users of the NNR command:
-
- ARTICLES -
- The default for the number of articles is 300. If you decide
- to use a number larger than this you may run out of virtual
- memory. The number of articles affects the behavior of the
- Header screen only. You have the option to read the article
- directly without the use of the Headers screen. This would
- start you at the first available article regardless of the
- number of articles. To override this default option you could
- type the following:
-
- "NNR ( ARTICLES 50"
-
- This will set the default for the Headers screen to the 50
- most recent articles. If you want more than 300 you may need
- to "DEFINE STORAGE 4M" and "IPL CMS" again.
-
- HEADERS -
- This option is for those people who would rather not see all
- of the fields associated with the header material. The headers
- contain information related to the news group and the individual
- who posted the news. To override this you would type the
- following:
-
- "NNR ( HEADERS NO"
-
- Additionally, at the Article level, you may toggle between
- headers+body or body only using the PFK "HeadBody".
-
- NEWS -
- The "NEWS" option is useful only when you specify a news
- group as an argument. "NEWS" with "ALL" will yield all articles
- for the specified group, "NEWS" with "NEW" will show only those
- articles new to you, based on the "Groups Read" file. You would
- type the following to get "ALL" the news ("NEW" is the default)
-
- "NNR news.announce.newusers ( NEWS ALL"
-
- Please note that the news group in the above example is in
- lower case. All groups are case sensitive.
-
- DAYSBACK -
- From time to time new groups get added to the server. The
- "daysback" option allows you to override the default window
- for the number of days back you examine new groups. The default
- number of days back is seven; you may go back as many as 30.
-
- There is a pseudo group associated with this phenomenon called
- "New_Groups_Since_mm/dd/yy" where mm/dd/yy will be the date
- from which we inventory the new groups. You would type the
- following to check the new groups 30 days back:
-
- "NNR ( DAYSBACK 30"
-
- LINES -
- The default for the number of lines per article is 1500. If you
- decide to use a number larger than this you may run out of virtual
- memory. Generally, you will find that the greater the number of lines
- specified, the more storage is required to display the article read
- (refer back to ARTICLES to see how to change storage).
-
- "NNR ( LINES 1500"
-
- LOG/NOLOG -
- When posting an article, NNR stores a copy of your post in the
- NNRPMLOG NOTEBOOK. If you do not wish to keep a copy, specify
- the NOLOG option. This option may also be manipulated through the
- "U_Prefer" PFK on the SHLI/Groups screen.
-
- "NNR ( NOLOG"
-
- POST -
- This option will put you directly in the POST screen. You must
- have a valid group as an argument.
-
- "NNR misc.test ( POST"
-
- Please note that the news group in the above example is in lower
- case. All groups are case sensitive.
-
- IPADDR -
- NNR is generally configured to a preferred news server but
- occasionally it will be desirable to connect to other news
- servers. The IPADDR option will allow you to override the
- default IP address for the preferred server.
-
- "NNR ( IPADDR 000.000.000.000"
-
- GENERAL FLOW -
-
-
- ---------- -----------
- | NNR | | NNR p_s |
- ---------- -----------
- ------------------------ | ----------------- |
- | NNR group.ext ( POST | | | NNR group.ext | |
- ------------------------ | ----------------- |
- | ----------- | |
- | | PHLI | | |
- | ----------- | |
- | | | |
- | ------------------- | |
- | |All_News/New_News| | |
- | ------------------- | |
- | | | |
- -------- ----------- | |
- | POST | | SHLI |---------|-------------------|
- -------- ----------- |
- | | | |
- --------------- | ------------|---------------
- | | | |
- | | | |
- | | | |
- ------------ ---------- ----------- ------------
- | ARTICLES | | POST | | HEADERS | | U_PREFER |
- ------------ ---------- ----------- ------------
- | | | |
- ---------- | ---------- | | |
- | POST |-----| MAIL | | | |
- ---------- ---------- | | |
- ---------------------- | ------------------
- | | |
- ------------ --------------------- ----------
- | ARTICLES | | SELECTED_ARTICLES | | POST |
- ------------ --------------------- ----------
- | |
- ------------------------
- |
- ---------- | ----------
- | POST |-----| MAIL |
- ---------- ----------
-
- VARIOUS SCREEN PFK DEFINITIONS
-
- ** PHLI/Main Screen
-
- Primary High Level Index and PFK definitions. CMS SUBSET is honored.
- ENTER toggles cursor position.
- Personal_Subscriptions - All those groups you are currently subscribed
- to. Treated the same as other HLIs.
- New_Groups_Since_mm/dd/yy - All new groups since you last read the news
- or 7-30 DAYSBACK.
- news - Description of news programs, etiquette and announcements.
- mitre - Contains all mitre related groups.
- PFK Help - This display.
- PFK All_News - Access all the news that is available. Articles read are
- not remembered. Move cursor to desired topic and press
- All_News PFK.
- PFK Quit - Exit NNR program.
- PFK New_News - Access news that is new to you according to "Groups Read"
- file on your account. Articles read are remembered.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
-
-
- ** SHLI/Groups Screen
-
- Move the cursor to a group and press Headers, Articles or Post PFK.
- CMS SUBSET is honored. ENTER toggles cursor position.
-
-
- PFK Help - This display.
- PFK Articles - Access articles sequentially by article number. Starts with
- the first available article. Cursor position respected.
- PFK Quit - Exits this screen.
- PFK Headers - Preferred path to articles. Collects subject and other
- information for display. Cursor position respected.
- PFK Post - Initiates posting procedure. Only group passed to the
- posting screen. Cursor position respected.
- PFK Mark - Mark the group as been read, zeros the article count.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Sub/UnS - Subscribe or UnSubscribe to a news group. Will add
- a group to the preferred pseudo HLI (see PREFs screen).
- PFK UpdtGrp - Updates the Group.
- PFK U_Prefer - Tailor user environment.
- PFK Power - Toggle between current Power setting. Initially OFF.
- ** Headers Screen
-
- This screen collects pertinent info. from each article to display the
- originator and something about the content, based on the selection
- criteria (subject). CMS SUBSET honored; ENTER toggles cursor position.
- PFK Help - This display.
- PFK Article - Read a specific article. Cursor position respected.
- PFK Quit - Exit Headers screen.
- PFK Selected - Mark each article at the "." with an "x". Mark as many as
- desired, then press the Selected PFK.
- PFK Post - Initiates posting procedure. The group and subject are
- passed to the posting screen. Cursor position respected.
- PFK Mrk2Here - Marks all articles as read, up to the cursor position or
- when cursor is on Command line, ALL articles are marked.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Thread - Collects articles based on subject.
- PFK Reduce - Eliminates read articles, "reduces" the number displayed.
- PFK Mrk/UMrk - Mark Article/UnMark Article toggle.
- PFK NxtGroup - Moves to the next group in the SHLI list.
-
- ** U_Prefer Screen
- You may change any of the values listed but do so carefully since it
- is possible to run out of virtual storage!
-
- Articles/Group - used to determine the upper limit for the number of
- articles collected on "Headers Screen". Default is 300 articles.
- Lines/Article - used to determine the upper limit for the number of lines
- collected for an article on "Article Screen". Default is 1500 lines.
- Log/NoLog - you may switch between logging all outgoing mail/post and
- not logging them. The default is "YES", log them.
- Add Pseudo PHLI - used in conjunction with the Sub/UnS PFK on the SHLI
- screen. The default is OFF, change this to any name and use the
- Sub/UnS PFK to add groups to the newly defined PHLI.
-
-
-
- PFK Help - This display.
- PFK Quit - Exit Preferences screen.
- PFK Rotate - Range through possible configuration values.
- ** POST(1) Screen
-
- You must come from the Article screen to get to Post Screen(1). This
- screen allows you to determine how to redirect an article.
-
-
- PFK Help - This Display.
- PFK Quit - Exit Post(1) screen.
- PFK Resume - Allows you to continue an existing POSTing. This is
- independent of the current article.
- PFK Followup - Newly edited information to be sent back to the server
- for POSTing.
- PFK Mail - Newly edited information to be directed to the local
- electronic mail system (must fill in recipient).
- PFK Reply - Newly edited information to be directed to the creator
- of an article (directed back to the "From:").
- PFK ERASE - Eliminate the previously edited POSTing to operate on
- the current article
-
- ** POST(2) Screen
-
- The Post Screen(2) allows you to modify any of the highlighted fields.
- It is highly recommended that no field be left blank; in some cases the
- MAIL or POST will fail. When sending MAIL use the following formats for
- the "To:" header (nicknames are supported):
-
- userid *or* userid@nodeid *or* userid@nodeid.domain.ext
- (* incorporate personal names as follows *)
- Firstname Lastname <userid@nodeid.domain.ext>
- userid@nodeid.domain.ext (Firstname Lastname)
-
- PFK Help - This Display.
- PFK Quit - Exit Post(2) screen.
- PFK Edit - Establishes a limited XEDIT session. When you come
- from the Article screen you will see the entire article
- is supplied.
- PFK Send - Will POST/MAIL the results of the edit session. You will
- receive confirmation that your contribution was
- successful.
-
- ** Article Screen
-
- Most commands honored from the command line. I try to screen out
- commands known to be disruptive to your NNR session.
-
-
- PFK Help - This display.
- PFK Next - Read the next article in the sequence.
- PFK Quit - Exit Article screen.
- PFK Previous - Read the previous article in the sequence.
- PFK PostMail - Initiates posting procedure. The group and subject are
- passed to the posting screen along with the article.
- PFK HeadBody - Toggles between headers+body and body only.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Print - Sends the article to the virtual printer.
- PFK Rot13 - Translates screen using a character rotation method.
- PFK Log - Logs article in NNRLOG NOTEBOOK.
- PFK NxtGroup - Moves to the next group in the SHLI list.
-
- USAGE NOTES
-
- 1. For a complete discussion of the NNR command, consult the NNR User's
- Guide.
-
- 2. There is also a Guide for USENET by the name USENET User Guide for
- Mitre. This is a compilation of articles taken from the news group
- "news.announce.newusers".
-
- EXAMPLES
-
- Sample NNR command invocations are shown below.
-
- "NNR"
- "NNR news.announce.newusers"
- "NNR news.announce.newusers ( NEWS ALL"
- "NNR ( ARTICLES 50"
- "NNR ( HEADERS NO"
- "NNR ( DAYSBACK 30"
- "NNR ( ARTICLES 300 HEADERS YES"
- "NNR ( ARTICLES 300 LINES 1500"
- "NNR ( LINES 1500 NOLOG"
- "NNR news.announce.newusers ( HEADERS NO"
-
- .cs 3 off
- .CM File generated by m21816 at mbvm
- :READ NNRHELP $XSCREEN D2 NNR130 05/10/92 14:41:59
- Primary High Level Index and PFK definitions. CMS SUBSET is honored.
- ENTER toggles cursor position.
- Personal_Subscriptions - All those groups you are currently subscribed
- to. Treated the same as other HLIs.
- New_Groups_Since_mm/dd/yy - All new groups since you last read the news
- or 7-30 DAYSBACK.
- news - Description of news programs, etiquette and announcements.
- mitre - Contains all mitre related groups.
- PFK Help - This display.
- PFK All_News - Access all the news that is available. Articles read are
- not remembered. Move cursor to desired topic and press
- All_News PFK.
- PFK Quit - Exit NNR program.
- PFK New_News - Access news that is new to you according to "Groups Read"
- file on your account. Articles read are remembered.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
-
- Move the cursor to a group and press Headers, Articles or Post PFK.
- CMS SUBSET is honored. ENTER toggles cursor position.
-
- PFK Help - This display.
- PFK Articles - Access articles sequentially by article number. Starts with
- the first available article. Cursor position respected.
- PFK Quit - Exits this screen.
- PFK Headers - Preferred path to articles. Collects subject and other
- information for display. Cursor position respected.
- PFK Post - Initiates posting procedure. Only group passed to the
- posting screen. Cursor position respected.
- PFK Mark - Mark the group as been read, zeros the article count.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Sub/UnS - Subscribe or UnSubscribe to a news group.
- PFK UpdtGrp - Updates the Group.
- PFK U_Prefer - Tailor user environment.
- PFK Power - Toggle between current Power setting. Initially OFF.
- This screen collects pertinent info. from each article to display the
- originator and something about the content, based on the selection
- criteria (subject). CMS SUBSET honored; ENTER toggles cursor position.
- PFK Help - This display.
- PFK Article - Read a specific article. Cursor position respected.
- PFK Quit - Exit Headers screen.
- PFK Selected - Mark each article at the "." with an "x". Mark as many as
- desired, then press the Selected PFK.
- PFK Post - Initiates posting procedure. The group and subject are
- passed to the posting screen. Cursor position respected.
- PFK Mrk2Here - Marks all articles as read, up to the cursor position or
- when cursor is on Command line, ALL articles are marked.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Thread - Collects articles based on subject.
- PFK Reduce - Eliminates read articles, "reduces" the number displayed.
- PFK Mrk/UMrk - Mark Article/UnMark Article toggle.
- PFK NxtGroup - Moves to the next group in the SHLI list.
- The post screen (2) allows you to modify any of the highlighted fields.
- It is highly recommended that no field be left blank; in some cases the
- MAIL or POST will fail. When sending MAIL use the following formats for
- the "To:" header (nicknames are supported):
-
- userid *or* userid@nodeid *or* userid@nodeid.domain.ext
- (* incorporate personal names as follows *)
- Firstname Lastname <userid@nodeid.domain.ext>
- userid@nodeid.domain.ext (Firstname Lastname)
-
- PFK Help - This Display.
- PFK Quit - Exit Post(2) screen.
- PFK Edit - Establishes a limited XEDIT session. When you come
- from the Article screen you will see the entire article
- is supplied.
- PFK Send - Will POST/MAIL the results of the edit session. You will
- receive confirmation that your contribution was
- successful.
- You must come from the Article screen to get to POST screen (1). This
- screen allows you to determine how to redirect an article.
-
-
- PFK Help - This Display.
- PFK Quit - Exit Post(1) screen.
- PFK Resume - Allows you to continue an existing POSTing. This is
- independent of the current article.
- PFK Followup - Newly edited information to be sent back to the server
- for POSTing.
- PFK Mail - Newly edited information to be directed to the local
- electronic mail system (must fill in recipient).
- PFK Reply - Newly edited information to be directed to the creator
- of an article (directed back to the "From:").
- PFK ERASE - Eliminate the previously edited POSTing to operate on
- the current article.
-
-
- Most commands honored from the command line. I try to screen out
- commands known to be disruptive to your NNR session.
-
- PFK Help - This display.
- PFK Next - Read the next article in the sequence.
- PFK Quit - Exit Article screen.
- PFK Previous - Read the previous article in the sequence.
- PFK PostMail - Initiates posting procedure. The group and subject are
- passed to the posting screen along with the article.
- PFK HeadBody - Toggles between headers+body and body only.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Print - Sends the article to the virtual printer.
- PFK Rot13 - Translates screen using a character rotation method.
- PFK Log - Logs article in NNRLOG NOTEBOOK.
- PFK NxtGroup - Moves to the next group in the SHLI list.
-
-
- You may change any of the values listed but do so carefully since it
- is possible to run out of virtual storage!
-
- Articles/Group - used to determine the upper limit for the number of
- articles collected on "Headers Screen". Default is 300 articles.
- Lines/Article - used to determine the upper limit for the number of lines
- collected for an article on "Article Screen". Default is 1500 lines.
- Log/NoLog - you may switch between logging all outgoing mail/post and
- not logging them. The default is "YES", log them.
- Add Pseudo PHLI - used in conjunction with the Sub/UnS PFK on the SHLI
- screen. The default is OFF, change this to any name and use the
- Sub/UnS PFK to add groups to the newly defined PHLI.
-
- PFK Help - This display.
- PFK Quit - Exit Preferences screen.
- PFK Rotate - Range through possible configuration values.
-
-
- :READ MITRE LICENSE D1 NNR130 03/07/91 05:04:18
- MITRE Corporation General Public License
- Version 1, October 1990
-
- Copyright (C) 1990 The MITRE Corporation
- Burlington Road,
- Bedford, MA. 01730
-
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
-
- This General Public License is intended to guarantee freedom to
- share and change software--to make sure the software is free for
- all its users. The General Public License applies to the MITRE
- Corporation's software.
-
- When we speak of free software, we are referring to freedom, not
- price. Specifically, the General Public License is designed to make
- sure that you have the freedom to give away copies of free
- software, that you receive source code or can get it if you want it,
- that you can change the software or use pieces of it in new free
- programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
- anyone to deny you these rights or to ask you to surrender the rights.
- These restrictions translate to certain responsibilities for you if you
- distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of a such a program, whether
- gratis or for a distribution fee, you must give the recipients all the rights
- that you have. You must make sure that they, too, receive or can get the
- source code. And you must tell them their rights.
-
- We protect your rights with two steps: (1) copyright the software, and
- (2) offer you this license which gives you legal permission to copy,
- distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
- that everyone understands that there is no warranty for this free
- software. If the software is modified by someone else and passed on, we
- want its recipients to know that what they have is not the original, so
- that any problems introduced by others will not reflect on the original
- authors' reputations.
-
- The precise terms and conditions for copying, distribution and
- modification follow.
-
- MITRE Corporation GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any program or other work which
- contains a notice placed by the copyright holder saying it may be
- distributed under the terms of this General Public License. The
- "Program", below, refers to any such program or work, and a "work based
- on the Program" means either the Program or any work containing the
- Program or a portion of it, either verbatim or with modifications. Each
- licensee is addressed as "you".
-
- 1. You may copy and distribute verbatim copies of the Program's source
- code as you receive it, in any medium, provided that you conspicuously and
- appropriately publish on each copy an appropriate copyright notice and
- disclaimer of warranty; keep intact all the notices that refer to this
- General Public License and to the absence of any warranty; and give any
- other recipients of the Program a copy of this General Public License
- along with the Program. You may charge a fee for the physical act of
- transferring a copy.
-
- 2. You may modify your copy or copies of the Program or any portion of
- it, and copy and distribute such modifications under the terms of Paragraph
- 1 above, provided that you also do the following:
-
- a) cause the modified files to carry prominent notices stating that
- you changed the files and the date of any change; and
-
- b) cause the whole of any work that you distribute or publish, that
- in whole or in part contains the Program or any part thereof, either
- with or without modifications, to be licensed at no charge to all
- third parties under the terms of this General Public License (except
- that you may choose to grant warranty protection to some or all
- third parties, at your option).
-
- c) If the modified program normally reads commands interactively when
- run, you must cause it, when started running for such interactive use
- in the simplest and most usual way, to print or display an
- announcement including an appropriate copyright notice and a notice
- that there is no warranty (or else, saying that you provide a
- warranty) and that users may redistribute the program under these
- conditions, and telling the user how to view a copy of this General
- Public License.
-
- d) You may charge a fee for the physical act of transferring a
- copy, and you may at your option offer warranty protection in
- exchange for a fee.
-
- Mere aggregation of another independent work with the Program (or its
- derivative) on a volume of a storage or distribution medium does not bring
- the other work under the scope of these terms.
-
- 3. You may copy and distribute the Program (or a portion or derivative of
- it, under Paragraph 2) in object code or executable form under the terms of
- Paragraphs 1 and 2 above provided that you also do one of the following:
-
- a) accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of
- Paragraphs 1 and 2 above; or,
-
- b) accompany it with a written offer, valid for at least three
- years, to give any third party free (except for a nominal charge
- for the cost of distribution) a complete machine-readable copy of the
- corresponding source code, to be distributed under the terms of
- Paragraphs 1 and 2 above; or,
-
- c) accompany it with the information you received as to where the
- corresponding source code may be obtained. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form alone.)
-
- Source code for a work means the preferred form of the work for making
- modifications to it. For an executable file, complete source code means
- all the source code for all modules it contains; but, as a special
- exception, it need not include source code for modules which are standard
- libraries that accompany the operating system on which the executable
- file runs, or for standard header files or definitions files that
- accompany that operating system.
-
- 4. You may not copy, modify, sublicense, distribute or transfer the
- Program except as expressly provided under this General Public License.
- Any attempt otherwise to copy, modify, sublicense, distribute or transfer
- the Program is void, and will automatically terminate your rights to use
- the Program under this License. However, parties who have received
- copies, or rights to use copies, from you under this General Public
- License will not have their licenses terminated so long as such parties
- remain in full compliance.
-
- 5. By copying, distributing or modifying the Program (or any work based
- on the Program) you indicate your acceptance of this license to do so,
- and all its terms and conditions.
-
- 6. Each time you redistribute the Program (or any work based on the
- Program), the recipient automatically receives a license from the original
- licensor to copy, distribute or modify the Program subject to these
- terms and conditions. You may not impose any further restrictions on the
- recipients' exercise of the rights granted herein.
-
- 7. The MITRE Corporation may publish revised and/or new versions
- of the General Public License from time to time. Such new versions will
- be similar in spirit to the present version, but may differ in detail to
- address new problems or concerns.
-
- Each version is given a distinguishing version number. If the Program
- specifies a version number of the license which applies to it and "any
- later version", you have the option of following the terms and
- conditions either of that version or of any later version published by
- the MITRE Corporation. If the Program does not specify a version
- number of the license, you may choose any version ever published by
- the MITRE Corporation.
-
- 8. If you wish to incorporate parts of the Program into other free
- programs whose distribution conditions are different, write to the author
- to ask for permission. For software which is copyrighted by the MITRE
- Corporation, write to the MITRE Corporation; we sometimes
- make exceptions for this. Our decision will be guided by the two goals
- of preserving the free status of all derivatives of our software.
-
- NO WARRANTY
-
- 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
- REPAIR OR CORRECTION.
-
- 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
- :READ CENSOR EXEC D2 NNR130 02/07/91 22:41:27
- /* link to nnr in write mode, issue CENSOR mode */
- address command
- arg mode
- if mode = '' then exit(-1)
- 'XEDIT Censor Work ' mode
- 'ERASE Censor OGroups' mode
- 'RENAME Censor Groups ' mode 'Censor OGroups' mode
- 'COPY Censor Work ' mode 'Censor Groups ' mode
- exit(rc)
- :READ NNR SCRIPT Z1 REXNNR 05/10/92 14:49:15
- .im POSTS FONT MONO CourB 9 CourBO 9 CourB 9 CourBO 9
- .im POSTS FONT TEXT Cent 11 CentI 11 CentB 11 CentBI 11
- .im POSTS FONT HELP Cour 10 CourO 10 CourB 10 CourBO 11
- .im POSTS FONT HEAD Cent 12 CentI 12 CentB 12 CentBI 12
- .im gmlss
- :SET item=page value=66
- :SET item=hor value='8.5i'
- :SET item=left value='0.6i'
- :SET item=line value='6.0i'
- :GDOC
- :frontm
- :titlep
- :title.NNR User's Guide (Version 1.3.0)
- :address
- :aline.Paul Campbell
- :aline.The MITRE Corporation
- :aline.Burlington Road
- :aline.Bedford, MA 01730
- :aline.------------------
- :aline.Internet address:
- :aline.CAMPBELL@MITRE.ORG
- :eaddress
- :date.&sysdate
- :etitlep
- :abstract
- :p.Network News Reader/VM (NNR) gives VM users interactive access to a
- wide variety of bulletin boards, digests and interest groups. The
- contributions come from all over the globe as well as from within
- your organization.
- The collective term for this type of news access is the USENET NetNews.
- You may access NNR from either the CMS environment by issuing the "NNR"
- command or from the MENUS environment via SINN (System Information
- panel, Network News).
- :p.NNR allows access to the various news groups. Inherent in this access
- is the ability to read an article, print the article, save the article,
- forward the article to a colleague and post an article to the Bulletin
- Board. When you post an article to the Bulletin Board, bear in mind the
- posting represents your organization
- to a potentially world-wide audience.
- :p.Network News Reader/VM (NNR) is a client implementation of Network
- News Transfer Protocol (NNTP) a.k.a RFC 977. An excerpt from the RFC
- appears in part in Appendix B.
- :toc
- :FIGLIST
- :body
- :h1.NNR Introduction
- :p.Network News Reader/VM (NNR) gives VM users interactive access to a
- wide variety of bulletin boards, digests and interest groups. The
- contributions come from all over the globe as well as from inside MITRE.
- The collective term for this type of news access is the USENET NetNews.
- You may access NNR from both the CMS environment by issuing the "NNR"
- command or from the MENUS environment via SINN (System Information
- panel, Network News).
- :p.NNR allows access to the various news groups. Inherent in this access
- is the ability to read an article, print the article, save the article,
- forward the article to a colleague and post an article to the Bulletin
- Board. All of these functions are somewhat innocuous except Posting to
- the network; you must bear in mind the default distribution may be world
- wide.
- :p.Network News Reader/VM (NNR) is a client implementation of Network
- News Transfer Protocol (NNTP) a.k.a RFC 977. An excerpt from the RFC
- appears in part in Appendix B.
- :FIG
-
- The format of the NNR command is:
-
- ----------------------------------------------------------------
- | | |
- | NNR | << Argument > ( Options > |
- | | |
- | | Where the argument may be a single news group |
- | | in the form "News.Group.Ext" or "p_s" which |
- | | delivers you to your Personal_Subscriptions. |
- | | |
- | | Where the options are: |
- | | |
- | | + + defaults: |
- | | | ARTICLES nnn | 300 |
- | | | HEADERS YES/NO| yes |
- | | | NEWS ALL/NEW| new |
- | | | DAYSBACK nn | 7 |
- | | | LINES nnnn | 1500 |
- | | | LOG/NOLOG | log |
- | | | POST | N/A |
- | | | IPADDR addr | System Default |
- | | + + |
- | | |
- ----------------------------------------------------------------
-
- NNR PARAMETERS
-
- NNR will take a news group as an argument.
-
- GENERAL NNR OPTIONS
-
- (see text for details)
- :FIGCAP.NNR - INVOKE Network News Reader
- :eFIG
- :H2.NNR Command
- :p.The NNR command will take a news group as an argument and has a few
- options. The group must be entered in mixed case since the server is
- case sensitive. There is one exception to this rule and that is when
- passing "p_s" as a group. "p_s" may be entered in any case since this
- is not passed to the server but interpreted by NNR as a request to
- collect all information associated with Personal_Subscriptions.
- :h2.General NNR Options
- .bf help
- .fo off
-
- ARTICLES - change the maximum number of articles for the Header screen.
-
- HEADERS - change between headers+body and body only.
-
- NEWS - allows you to specify ALL or NEW from the command line.
-
- DAYSBACK - the number of days back to collect new news groups.
-
- LINES - Change the maximum number of lines per article.
-
- LOG/NOLOG - A log setting for outgoing mail and posts.
-
- POST - Allows you to initiate a posting from the command line.
-
- IPADDR - Enables connections to multiple servers.
-
- .fo on
- .pf
- :h3.Articles -
- :p.The default for the number of articles is 300. If you decide to use a
- number larger than this you may run out of virtual memory. The number of
- articles affects the behavior of the Headers screen only. You have the
- option to read the article directly without the use of the Headers
- screen. This would start you at the first available article regardless
- of the number of articles. To override this default option you could
- type the following:
-
- "NNR ( ARTICLES 50"
- :p.This will set the default for the Headers screen to the 50 most
- recent articles. If you want more than 300 you may need to "DEFINE
- STORAGE 4M" and "IPL CMS" again.
- :h3.Headers -
- :p.This option is for those people who would rather not see all of the
- fields associated with the header material. The headers contain
- information related to the news group and the individual who posted the
- news. To override this you would type the following:
-
- "NNR ( HEADERS NO"
- :p.Additionally, at the Article level, you may toggle between
- headers+body or body only using the PFK "HeadBody".
- :h3.News -
- :p.The "NEWS" option is useful only when you specify a news group as an
- argument. "NEWS" with "ALL" will yield all articles for the specified
- group, "NEWS" with "NEW" will show only those articles new to you, based
- on the "Groups Read" file. You would type the following to get "ALL" the
- news ("NEW" is the default):
-
- "NNR news.announce.newusers ( NEWS ALL"
- :p.Please note that the news group in the above example is in lower
- case. All groups are case sensitive.
- :h3.Daysback -
- :p.From time to time new groups get added to the server. The "daysback"
- option allows you to override the default window for the number of days
- back you examine new groups. The default number of days back is seven;
- you may go back as many as 30.
- :p.There is a pseudo group associated with this phenomenon called
- "New_Groups_Since_mm/dd/yy" where mm/dd/yy will be the date from which
- we inventory the new groups. You would type the following to check the
- new groups 30 days back:
-
- "NNR ( DAYSBACK 30"
- :h3.Lines -
- :p.The default for the number of lines per article is 1500. If you
- decide to use a number larger than this you may run out of virtual
- memory. Generally, you will find that the greater the number of lines
- specified, the more storage is required to display the article read
- (refer back to ARTICLES to see how to change storage).
-
- "NNR ( LINES 1500"
- :h3.Log/NoLog -
- :p.When posting an article, NNR stores a copy of your post in the
- NNRPMLOG NOTEBOOK. If you do not wish to keep a copy, specify the NOLOG
- option. This option may also be manipulated through the "U_Prefer" PFK
- on the SHLI/Groups screen.
-
- "NNR ( NOLOG"
-
- :h3.Post -
- :p.This option will put you directly in the POST screen. You must have
- a valid group as an argument.
-
- "NNR misc.test ( POST"
- :p.Please note that the news group in the above example is in lower
- case. All groups are case sensitive.
- :h3.IPaddr -
- :p.NNR is generally configured to a preferred news server but
- occasionally it will be desirable to connect to other news servers.
- The IPADDR option will allow you to override the default IP address
- for the preferred server.
-
- "NNR ( IPADDR 000.000.000.000"
- :h2.Examples
- .fo off
- Sample NNR command invocations are shown below.
-
- "NNR"
- "NNR news.announce.newusers"
- "NNR news.announce.newusers ( NEWS ALL"
- "NNR ( ARTICLES 50"
- "NNR ( HEADERS NO"
- "NNR ( DAYSBACK 30"
- "NNR ( ARTICLES 300 HEADERS YES"
- "NNR ( ARTICLES 300 LINES 1500"
- "NNR ( LINES 1500 NOLOG"
- "NNR news.announce.newusers ( HEADERS NO"
- "NNR misc.test ( POST"
- "NNR comp.compilers ( IPADDR 000.000.000.000"
- "NNR p_s ( IPADDR 010.010.010.010"
- .fo on
-
- :FIG
- General Flow -
-
- ---------- -----------
- | NNR | | NNR p_s |
- ---------- -----------
- ------------------------ | ----------------- |
- | NNR group.ext ( POST | | | NNR group.ext | |
- ------------------------ | ----------------- |
- | ----------- | |
- | | PHLI | | |
- | ----------- | |
- | | | |
- | ------------------- | |
- | |All_News/New_News| | |
- | ------------------- | |
- | | | |
- -------- ----------- | |
- | POST | | SHLI |---------|-------------------|
- -------- ----------- |
- | | | |
- --------------- | ------------|---------------
- | | | |
- | | | |
- | | | |
- ------------ ---------- ----------- ------------
- | ARTICLES | | POST | | HEADERS | | U_PREFER |
- ------------ ---------- ----------- ------------
- | | | |
- ---------- | ---------- | | |
- | POST |-----| MAIL | | | |
- ---------- ---------- | | |
- ---------------------- | ------------------
- | | |
- ------------ --------------------- ----------
- | ARTICLES | | SELECTED_ARTICLES | | POST |
- ------------ --------------------- ----------
- | |
- ------------------------
- |
- ---------- | ----------
- | POST |-----| MAIL |
- ---------- ----------
- :FIGCAP.General Flow Diagram
- :eFIG
- :H1.PHLI/Main Screen
- :H2.General Help -
- :p.To use this screen you simply move the cursor to the desired Primary
- High Level Index (PHLI) and hit one of the Program Function Keys (PFK).
- The PHLI is the principal part of the name of a group. All groups with
- the same PHLI are related in some way. For example "mitre" represents
- all groups associated with MITRE. Positioning the cursor on top of
- "mitre" and pressing a PFK will initiate some action. Depending on the
- PFK, you can read all the news, read only the new news or exit back to
- CMS. In addition you will have the ability to enter "SUBSET" on the
- command line and go temporarily to the CMS environment. To return to
- NNR, you must issue the command "return".
- :p.There are currently two special purpose PHLIs, Personal_Subscriptions
- and New_Groups_Since_mm/dd/yy. These are slightly different from the
- other PHLIs since they will only appear after explicit use of the NNR
- command. The Personal_Subscription PHLI is a collection of all the
- groups you have subscribed to either overtly using the "Sub/UnS" PFK or
- simply by reading an article within a group while in "New_News". The
- New_Groups_Since... PHLI is a collection of groups that are new to the
- server (according to the value of the DAYSBACK option).
- :p.In addition to the predefined PHLIs (Personal_Subscriptions
- and New_Groups_Since_mm/dd/yy) there is an ability to define your
- own. Depicted in the sample PHLI you will notice number of entries
- prefixed by "Personal_". As stated earlier "Subscriptions" is predefined
- and will always appear on this screen. The other entries such as "Test"
- and "VM" are user defined and built. These pseudo PHLI will remain
- as long as there are groups associated with them. You will also notice
- that a group can appear in both the "Subscriptions" list and one other
- user defined list. To define a pseudo PHLI use the "U_Prefer" screen
- and to add an entry use the Sub/UnS PFK (on SHLI screen).
- :p.On all of the screens described the "enter" key will toggle
- the cursor between the command line and the current cursor position.
- If you are familiar with previous versions of NNR you may have
- discovered the "Cursor" PFK has disappeared. We set this up to conserve
- on PFKs. This function is intended to give you fast access to the
- command line for issuing the "SUBSET" command so you may drop into a CMS
- subset. In order to return from the subset you need to type "return".
- :h2.Help -
- :p.The Help PFK will display the following information:
-
- .bf help
- .fo off
- Primary High Level Index and PFK definitions. CMS SUBSET is honored.
- ENTER toggles cursor position.
- Personal_Subscriptions - All those groups you are currently subscribed
- to. Treated the same as other HLIs.
- New_Groups_Since_mm/dd/yy - All new groups since you last read the news
- or 7-30 DAYSBACK.
- news - Description of news programs, etiquette and announcements.
- mitre - Contains all mitre related groups.
- PFK Help - This display.
- PFK All_News - Access all the news that is available. Articles read are
- not remembered. Move cursor to desired topic and press
- All_News PFK.
- PFK Quit - Exit NNR program.
- PFK New_News - Access news that is new to you according to "Groups Read"
- file on your account. Articles read are remembered.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- .pf
- :FIG place='inline'
- *** NNR/VM (R_1.3.0) *** PHLI/Main
- High Level Index
- New_Groups_Since_05/04/92| comp | pubnet
- Personal_Subscriptions | compusec | rec
- Personal_BBoardsEtc | control | sci
- Personal_News | dc | soc
- Personal_Sources | ddn | su
- Personal_Tests | general | talk
- Personal_VM | gnu | test
- Personal_Languages | ieee | to
- Personal_My.Clari | junk | trial
- Personal_Networking | k12 | ucb
- Personal_MITRE | md | unix-pc
- alt | misc | va
- ba | mitre | vmsnet
- bionet | na |
- bit | ne |
- biz | news |
- ca | nj |
- clari | ny |
-
- 1= Help 2= All_News 3= Quit 4= New_News 5= 6=
- 7= Backward 8= Forward 9= 10= 11= 12=
- ====>
- :FIGCAP.Sample PHLI/Main screen
- :eFIG
- :h2.All_News -
- .fo on
- :p.Allows a user to review all the news associated with a high level
- index regardless of the articles previously read for any one group. For
- example if you have been following "comp.compilers", you may have read an
- article that is associated with the article you are currently reading.
- You might use this function to get all the available news for
- "comp.compilers" and then search for the desired articles (see Sample
- Headers Screen).
- :h2.Quit -
- Quitting from the Primary High Level Index will exit the NNR program.
- Upon termination, NNR will try to save session information in the file
- "Groups Read". You will notice that the file name and type are in mixed
- case. This is done so you do not inadvertently erase or destroy the
- file. The content of the Groups Read file determines where you will
- start reading a specific news group.
- :h2.New_News -
- :p.New_News will attempt to remember every article read. If for example
- you are following "comp.compilers", every time you read an article,
- whether from the Headers screen, Selected_Articles screen or from the
- Articles PFK on the SHLI screen, the number of the last article read is
- recorded.
- :h2.Backward -
- :p.Scrolls the screen backward.
- :h2.Forward-
- :p.Scrolls the screen forward.
- :h1.SHLI/Group Screen
- :h2.General Help -
- :p.To use this screen you simply move the cursor to the desired
- Secondary High Level Index (SHLI) and hit one of the Program Function
- Keys (PFK). The SHLI is better known as a group or a news group. Each
- news group is comprised of articles. The number of articles and posting
- information accompanies each group. You may check out a particular group
- from this screen using the PFKs below.
- :p.You will notice that some of the groups are highlighted and some are
- not. A group becomes highlighted when you subscribe "Sub/UnS" or read the
- group while in "New_News". This highlighted group will eventually appear
- in your Personal_Subscriptions group, but it will take a new session to
- record it.
- :p.The "Power" feature that you see in the upper left corner of this
- screen indicates whether you have entered the Power Read mode. By
- default the power mode is "OFF". See the "Power" PFK information for
- more details.
- :FIG place='inline'
- *** NNR/VM (R_1.3.0) *** SHLI/Groups
- Power OFF(Groups=1/351)
- comp.admin.policy 41 y | comp.binaries.ibm.pc.d 100 y
- comp.ai 67 y | comp.binaries.ibm.pc.wanted 151 y
- comp.ai.edu 1 y | comp.binaries.mac 29 m
- comp.ai.neural-nets 33 y | comp.binaries.os2 87 m
- comp.ai.nlang-know-rep 0 m | comp.bugs.misc 0 y
- comp.ai.philosophy 155 y | comp.bugs.sys5 5 y
- comp.ai.shells 7 y | comp.bugs.2bsd 18 y
- comp.ai.vision 1 m | comp.bugs.4bsd 11 y
- comp.arch 87 y | comp.bugs.4bsd.ucb-fixes 0 m
- comp.archives 267 m | comp.cog-eng 50 y
- comp.archives.admin 47 y | comp.compilers 46 m
- comp.benchmarks 19 y | comp.compression 73 y
- comp.binaries.acorn 16 m | comp.databases 10 y
- comp.binaries.amiga 0 m | comp.databases.informix 30 y
- comp.binaries.apple2 13 y | comp.dcom.fax 37 y
- comp.binaries.atari.st 22 m | comp.dcom.lans 66 y
- comp.binaries.ibm.pc 14 m | comp.dcom.lans.ethernet 21 y
- comp.binaries.ibm.pc.archive 80 y | comp.dcom.lans.fddi 14 y
-
- 1= Help 2= Articles 3= Quit 4= Headers 5= Post 6= Mark
- 7= Backward 8= Forward 9= Sub/UnS 10= UpdtGrp 11= U_Prefer 12= Power
- ====>
- :FIGCAP.Sample SHLI/Groups Screen
- :eFIG
- .pa
- :h2.Help -
- :p.The Help PFK will display the following information:
-
- .bf help
- .fo off
- Move the cursor to a group and press Headers, Articles or Post PFK.
- CMS SUBSET is honored. ENTER toggles cursor position.
-
- PFK Help - This display.
- PFK Articles - Access articles sequentially by article number. Starts with
- the first available article. Cursor position respected.
- PFK Quit - Exits this screen.
- PFK Headers - Preferred path to articles. Collects subject and other
- information for display. Cursor position respected.
- PFK Post - Initiates posting procedure. Only group passed to the
- posting screen. Cursor position respected.
- PFK Mark - Mark the group as been read, zeros the article count.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK UpdtGrp - Updates the Group.
- PFK Sub/UnS - Subscribe or UnSubscribe to a news group.
- PFK U_Prefer - Tailor user environment.
- PFK Power - Toggle between current Power setting. Initially OFF.
- .pf
- :h2.Articles -
- .fo on
- :p.The Articles function will behave differently depending on how you
- arrived at this screen. If you had selected All_News on the main screen
- you will get the first available article known to the server for the
- selected group. If you had previously selected New_News then you would
- find yourself reading the next available article based on your "Groups
- Read" file. In all cases you will be dropped into a full screen dialog
- where you may read the first article. From within the article, there are
- a variety of options; see the Article Screen for details.
- :h2.Quit -
- :p.Quitting here will not exit the NNR program. There is a hierarchical
- relationship among routines. Whenever you QUIT a screen you will return
- to the place you started from. In this case you will be returned to the
- PHLI screen where you will be able to select another PHLI function or
- QUIT the NNR program.
- :h2.Headers -
- :p.Selecting Headers here will collect information about all articles
- available from the server, based on whether All_News or New_News was
- previously selected. In any case you will see who the article was from,
- a "." and the subject (see the Headers screen chapter). The subject
- string is actually a variable parameter which may be changed using
- "U_Prefer". For example, if you want to read the group "junk", then
- using the subject is not very useful, but changing "subject" to
- "newsgroups" (on the U_Prefer Screen) would yield much more information
- about the content of this group.
- :h2.Post -
- :p.Posting from this screen will supply only the group to be posted to.
- You will have to supply the subject. There are two other screens where
- posting is an option, the Headers screen and the Article screen (refer
- to these sections).
- :h2.Mark -
- :p.The Mark PFK, when reading in the "New_News" mode, will bring the
- group up to date or "mark" it as read. For example, if you move the
- cursor to "comp.compilers" and hit the "Mark" PFK you will see the
- displayed number of articles change to "0". Now when you see the article
- count change from "0" there will be new articles to be read.
- :p.This PFK is unavailable while in "All_News"
- and will not be displayed.
- :h2.Backward -
- :p.This PFK will allow you to move backward through all the groups.
- There is a top and a bottom to the groups displayed; it does not wrap
- around. Also notice that the groups are displayed in two columns, the
- bottom of column 1 leads to the top of column 2. A message will be
- displayed at the logical top of all the groups associated with the
- SHLI/Groups.
- :h2.Forward -
- :p.This PFK will allow you to move forward through all the groups. There
- is a top and a bottom to the groups displayed; it does not wrap around.
- Also notice that the groups are displayed in two columns, the bottom of
- column 1 leads to the top of column 2. A message will be displayed at
- the logical bottom of all the groups associated with the SHLI/Groups.
- :h2.UpdtGrp -
- :p.When pressed this PFK will check with the server to see if there is
- any additional news for the associated group. In the event that there
- is additional news you should see the number of articles increase.
- :p.There is also an "update" command that may be used from the
- command line that will update all groups in the SHLI. This is a handy
- command for repairing any damage to your Personal_Subscriptions SHLI.
- The update command will work in "All_News" and "New_News".
- :h2.Sub/UnS -
- :p.Sub/UnS (Subscribe/UnSubscribe) will either subscribe you to a news
- group or unsubscribe from a news group, depending on whether or not you
- are currently subscribed. If you have defined a pseudo PHLI (via the
- U_Prefer Screen) you will also be adding the group to your user defined
- PHLI as well as to the Personal_Subscriptions PHLI. When adding or
- deleting groups from any of the "Personal_*" PHLIs you should see that
- the process is dynamic, that the number of groups within a PHLI will
- increase as you subscribe and decrease as you unsubscribe. With the
- user defined PHLIs it is possible to eliminate a PHLI by
- unsubscribing all the groups. A user defined PHLI is created by
- subscribing to the first group after definition on the "U_Prefer"
- screen.
- :p.This PFK is unavailable while in "All_News"
- and will not be displayed.
- :h2.U_Prefer -
- :P.You have the ability to change some of the NNR defaults set by your
- system administrator through the "U_Prefer" Screen. All of these
- settings may also be changed on the command line at NNR invocation.
- The settings for LINES and ARTICLES are determined as suitable for the
- average virtual memory size at your site. Changes to these settings
- should be made with the understanding that NNR may run out of storage
- when collecting too many articles on the Headers Screen or reading large
- articles (too many lines). See the U_Prefer Screen for more details.
- :h2.Power -
- :p.Power reading was set up for those individuals who use the "Articles"
- PFK from this screen. When Power is toggled ON you have the ability
- to read all the news for the selected SHLI/Group using only the "Next"
- PFK on the Article Screen. When you issue the "Articles" PFK and start
- reading all the available articles, Power ON means that there is an
- implied "NxtGroup" in effect ("NxtGroup" locates the next group in the
- SHLI list). So when you exhaust all the articles for the current group,
- NNR will locate the next group and start you at its first article. This
- function is best suited for the "Personal_Subscriptions" in "New_News"
- mode.
- :h1.Headers Screen
- :h2.General Help -
- :p.To use this screen you simply move the cursor to the desired article
- and use a Program Function Key (PFK) or replace the "." with any
- character and use the Selected_Articles function. In the following
- figure notice the "X" which has replaced the ".". Used in conjunction
- with the Selected_Articles function it would drop you into the article
- indicated by the X. You may mark as may articles as you wish. Also
- notice the "*"; this is an indication that you have read this article
- during the current session or a previous session (NNR attempts to
- remember articles read while in "New_News").
- :p.On the Headers Screen in the upper left corner you will notice
- "R 0" as an initial setting. This is a "Reduce" indicator, which counts
- the number of times you have issued the Reduce PFK. Use the Quit PFK
- to bring it back to zero.
- :p.The CMS "SUBSET" command is also honored from this screen.
-
-
- :FIG place='inline'
- R 0 *** NNR/VM (R_1.3.0) *** Headers
- comp.admin.policy (Articles=1/41)
- mpye@vmsb.is.csupomo X Re: SPA -- what are your rights?
- tinsel@uiuc.edu (Tho . Re: SPA -- what are your rights?
- andy@homebase.vistac . Re: SPA -- what are your rights?
- jet@karazm.math.uh.e . Administration in a research environment -- survey
- john@iastate.edu (Jo * Re: Administration in a research environment -- survey
- paw@coos.dartmouth.e . Re: Temperature of computer labs
- ryan@eas.gatech.edu . Re: A question of ethics
- michael@resonex.com . Re: SPA -- what are your rights?
- jkp@cs.HUT.FI (Jyrki . Re: SPA -- what are your rights?
- kadie@eff.org (Carl . Abstract of CAF-News 02.18
- paris@zygon.dev.cdx. . Re: Administration in a research environment -- survey
- kadie@eff.org (Carl . Administration in a research environment -- survey
- john@iastate.edu (Jo . Re: Administration in a research environment -- survey
- anselmo-ed@cs.yale.e . Re: Administration in a research environment -- survey
- sbarber@panix.com (S . Re: SPA -- what are your rights?
- sck@watson.ibm.com ( . Re: Administration in a research environment -- survey
- michael@resonex.com . Re: SPA -- what are your rights?
- ptownson@eecs.nwu.ed . Re: SPA -- what are your rights?
-
- 1= Help 2= Article 3= Quit 4= Selected 5= Post 6= Mrk2Here
- 7= Backward 8= Forward 9= Thread 10= Reduce 11= Mrk/UMrk 12= NxtGroup
- ====>
- :FIGCAP.Sample Headers Screen
- :eFIG
- :h2.Help -
- :p.The Help PFK will display the following information:
-
- .bf help
- .fo off
- This screen collects pertinent info. from each article to display the
- originator and something about the content, based on the selection
- criteria (subject). CMS SUBSET honored; ENTER toggles cursor position.
- PFK Help - This display.
- PFK Article - Read a specific article. Cursor position respected.
- PFK Quit - Exit Headers screen.
- PFK Selected - Mark each article at the "." with an "x". Mark as many as
- desired, then press the Selected PFK.
- PFK Post - Initiates posting procedure. The group and subject are
- passed to the posting screen. Cursor position respected.
- PFK Mrk2Here - Marks all articles as read up to the cursor position or
- when cursor is on Command line, ALL articles are marked.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Thread - Collects articles based on subject.
- PFK Reduce - Eliminates read articles, "reduces" the number displayed.
- PFK Mrk/UMrk - Mark Article/UnMark Article toggle.
- PFK NxtGroup - Moves to the next group in the SHLI list.
- .pf
- :h2.Article -
- .fo on
- :p.The Article function will behave differently depending on how you
- arrived at this screen. If you had selected All_News you will get the
- first available article known to the server for the selected group. If
- you had previously selected New_News then you would find yourself
- reading the next available article based on your "Groups Read" file.
- :h2.Quit -
- :p.Quitting here will not exit the NNR program. There is a hierarchical
- relationship among routines. Whenever you QUIT a screen you will return
- to the place you started from. In this case you will be returned to the
- SHLI screen where you will be able to select another group.
- :h2.Selected_Articles -
- :p.You may select several articles from many screens by putting a
- character in the "." column on any line. Once all the articles that you
- want to read are flagged, issue the Selected_Articles function.
- :h2.Post -
- :p.Posting from this screen will supply the group to be posted to as
- well as the subject. The subject line will be slightly modified to
- indicate that the posting is a reply. See PostMail (Post Screen(2)).
- :h2.Mrk2Here -
- :p.Marks all articles up to the cursor position as read. This is only
- permissible while in "New_News" and
- will not be displayed while in "All_News".
-
- *Note: Mrk2Here will also mark all
- the articles in the current Group as read, when issued while the cursor
- is on the command line.
- :h2.Backward -
- :p.This PFK will allow you to move backward through all the Headers. You
- will find that there is a top and a bottom to the Headers displayed; it
- will not wrap around.
- :h2.Forward -
- :p.This PFK will allow you to move forward through all the Headers. You
- will find that there is a top and a bottom to the Headers displayed; it
- will not wrap around.
- :h2.Thread -
- :p.This is an effort to associate articles based on similar subjects.
- The "Thread" PFK will examine all articles currently in the headers
- display and group similar articles together. These articles will not be
- remembered as being read. Place the cursor anywhere on a line with the
- subject of interest and issue the Thread function.
- :h2.Reduce -
- :p.This PFK will eliminate articles from the display that have been
- read. An asterisk appearing in the cursor column is an indication that
- you have read this article. When you press the "Reduce" function all
- articles with an asterisk are eliminated from view. You will also notice
- an "R 1" in the upper left corner of the display. This is an indication
- of the number of reductions done on the screen. It is advisable to limit
- your reductions to one per session. When you attempt to QUIT from a
- screen "reduced" by either the Thread or Reduce functions, the full
- screen as originally viewed will return first, then you may QUIT in the
- normal way.
- :h2.Mrk/UMrk -
- :p.Mark Article/UnMark Article toggle. Mark a specific article as having
- been read or UnMark it. You will see that the asterisk and period
- characters toggle as well. This is only permissible while in the
- "New_News" mode and
- will not be displayed while in "All_News".
- :p.This PFK is unavailable while in "All_News".
- :h2.NxtGroup -
- :p.This PFK will move you to the next available group according to the
- SHLI list you are currently in. When you reach the last group on the
- list you will automatically go back to the SHLI Screen. "NxtGroup"
- will skip over all the groups with zero articles.
- :h1.U_Prefer Screen
- :h2.General Help -
- :p.The User Preferences Screen attempts to make NNR more useful in
- irregular situations (normally none of the User configurable parameters
- should need changing). The Header Screen option is changed by the Rotate
- PFK; the other values must be filled in. Once any of the values are
- changed they will retain their setting for the duration of the NNR
- session or until changed again. The values will be reset to the default
- on the next invocation of NNR.
- :p.The line "Set Current Personal HLI Qualifier (OFF): OFF" will
- allow a user to create Personal PHLIs. By changing the default setting
- to something other than "OFF" (or "Subscriptions") you will start the
- process of adding groups to both the newly defined PHLI and to
- Personal_Subscriptions. This mechanism is case sensitive ("XYZ", "XyZ"
- and "xYz" would be valid and distinct personal pseudo PHLIs).
-
- :FIG place='inline'
- *** NNR/VM (R_1.3.0) *** User Preferences
-
-
-
-
- Use PF12 to Rotate value for Header Screen display: Subject
-
- Maximum number of Articles/Group(300): 300
-
- Maximum number of Lines/Article(1500): 1500
-
- Log outgoing POSTings and MAIL(YES/NO): YES
-
- Set Current Personal HLI Qualifier (OFF): OFF
-
-
-
-
-
-
-
- 1= Help 2= 3= Quit 4= 5= 6=
- 7= 8= 9= 10= 11= 12= Rotate
- ====>
- :FIGCAP.Sample U_Prefer Screen
- :eFIG
- .pa
- :h2.Help -
- :p.The Help PFK will display the following information:
-
- .bf help
- .fo off
- You may change any of the values listed but do so carefully since it
- is possible to run out of virtual storage!
-
- Articles/Group - used to determine the upper limit for the number of
- articles collected on the "Headers Screen". Default is 300 articles.
- Lines/Article - used to determine the upper limit for the number of lines
- collected for an article on the "Article Screen". Default is 1500 lines.
- Log/NoLog - you may switch between logging all outgoing mail/post and
- not logging them. The default is "YES", log them.
- Add Pseudo PHLI - used in conjunction with the Sub/UnSub PFK on the SHLI
- screen. The default is OFF, change this to any name and use the
- Sub/UnSub PFK to add groups to the newly defined PHLI.
-
-
-
- PFK Help - This display.
- PFK Quit - Exit Preferences screen.
- PFK Rotate - Range through possible configuration values.
- .pf
- :h2.Quit -
- .fo on
- :p.Quitting here will not exit the NNR program. There is a hierarchical
- relationship among routines. Whenever you QUIT a screen you will return
- to the place you started from. In this case you will be returned to
- either the SHLI/Group or the Header screen.
- :h2.Rotate -
- :p.This PFK will walk through all the possible configuration values for
- a display field. You may check if a display field on the screen will
- "Rotate" by moving the cursor to the desired field and pressing the
- Rotate PFK. You will either see the next value or an error message
- indicating that the PFK doesn't work there.
- :h1.Article Screen
- :h2.General Help -
- :p.There are three ways to get to this screen. The first is by
- selecting the "Articles" PFK for a specific group from the SHLI/Group
- screen. This would place you at the first available article depending on
- your "Groups Read" file if you have come by way of New_News, or the very
- first article available to the network if you have come by way of
- All_News. A second path would be via the Headers screen. The article
- selected in this case would depend on the cursor position. The article
- directly under the cursor would be the article selected when the
- "Article" function is pressed. The cursor could be placed anywhere on
- the line to get the desired article. The third way is also from the
- Headers screen. It takes an alternate path to the Article screen via the
- Selected_Article key. Prior to executing this function you should have
- marked an article to be read by placing any character in the "." column.
- You may do this for any article within the group, for as many articles
- as you wish.
-
-
- :FIG place='inline'
- *** NNR/VM (R_1.3.0) *** Article
- #720 OSF Newsletter - June 1991
- mitre.techbb (Lines=1/1607)
- * * * Top of File * * *
- Newsgroups: mitre.techbb
- Path: linus!daemon
- From: tkb@mbunix.mitre.org
- Subject: OSF Newsletter - June 1991
- Message-ID: <1991Jun27.122152.18763@linus.mitre.org>
- Sender: daemon@linus.mitre.org
- Organization: The MITRE Corp. Mail to News relay
- Distribution: mitre
- Date: Thu, 27 Jun 1991 12:21:52 GMT
- Lines: 1595
-
-
-
- To: OSF Members
-
- From: corpcom@osf.org (OSF Corporate Communications
- Open Software Foundation)
- 1= Help 2= Next 3= Quit 4= Previous 5= PostMail 6= HeadBody
- 7= Backward 8= Forward 9= Print 10= Rot13 11= Log 12= NxtGroup
- ====>
- :FIGCAP.Sample Article Screen
- :eFIG
- .pa
- :h2.Help -
- :p.The Help PFK will display the following information:
-
- .bf help
- .fo off
- Most commands honored from the command line. I try to screen out
- commands known to be disruptive to your NNR session.
-
- PFK Help - This display.
- PFK Next - Read the next article in the sequence.
- PFK Quit - Exit Article screen.
- PFK Previous - Read the previous article in the sequence.
- PFK PostMail - Initiates posting procedure. The group and subject are
- passed to the posting screen along with the article.
- PFK HeadBody - Toggles between headers+body and body only.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Print - Sends the article to the virtual printer.
- PFK Rot13 - Translate screen using a character rotation method.
- PFK Log - Logs article in NNRLOG NOTEBOOK.
- PFK NxtGroup - Moves to the next group in the SHLI list.
- .pf
- :h2.Next -
- .fo on
- :p.Next will move you to the next available article, regardless of how
- you have reached this point. You may read all remaining articles. Once
- the last article is read you will return automatically to the previous
- screen.
- :h2.Quit -
- :p.Quitting here will not exit the NNR program. There is a hierarchical
- relationship among routines. Whenever you QUIT a screen you will return
- to the place you started from. In this case you will be returned to
- either the SHLI/Group or the Header screen.
- :h2.Previous -
- :p.The Previous function will move you to the previous article,
- regardless of how you have reached this point. You may go back for as
- many articles as you wish, depending on the selection criteria.
- :h2.PostMail -
- :p.Posting from this screen will supply the group to be posted to, the
- subject and the content of the article. See PostMail (Post Screen(1)).
- :h2.Headbody -
- :p.HeadBody is an article headers+body/body only toggle. If you are
- viewing both header and body you toggle to body only. If you are viewing
- body only you toggle to headers+body. The value of the NNR "Headers"
- option determines the setting initially. Once set, the setting remains
- in effect for the entire session but you may toggle as often as you
- like.
- :H2.Backward -
- :p.This PFK will allow you to move backward through all the Articles.
- You will find that there is a top and a bottom to the Articles displayed
- and it will not wrap around.
- :h2.Forward -
- :p.This PFK will allow you to move forward through all the Articles. You
- will find that there is a top and a bottom to the Articles displayed and
- it will not wrap around.
- :h2.Print -
- :p.Print will spool the current article to your virtual printer. Upon
- exiting NNR the content of your virtual printer will be directed to your
- preferred system printer and will print under one banner.
- :h2.Rot13 -
- :p.There is a popular method of encoding some material included in some
- articles. The "Rot13" (Rotate 13 characters) PFK will attempt to decode
- them.
- :h2.Log -
- :p.Use LOG to save an article in a CMS notebook. The LOG command is also
- available from the command line. Once the articles are logged you may
- then use the RMAIL/MAILBOOK facility against them.
- :h2.NxtGroup -
- :p.This PFK will move you to the next available group according to the
- SHLI list you are currently in. When you reach the last group on the
- list you will automatically go back to the SHLI Screen. "NxtGroup"
- will skip over all the groups with zero articles.
- :h1.PostMail
- :h2.Post Screen(1)
- :h3.General Help -
- :p.This is a simple mailer/poster. It is comprised of two
- screens, Post Screen(1) and Post Screen(2). The first screen will be
- encountered when coming from the Article screen and when NNR detects
- that there is an unfinished article that was started sometime earlier.
- From this screen you determine the course of your reply; you may send it
- to a colleague, follow-up to the news server or reply back to the
- sender.
- :p.The second screen you may encounter (from the Headers or Group
- Screen) will give you an opportunity to change some of the captured
- information and in the case of forwarding the article ("Mail" PFK) you
- will be called upon to type in the recipient's electronic address (See
- Post Screen(2) Help).
-
-
- :FIG place='inline'
- *** NNR/VM (R_1.3.0) *** Post(1)
-
- Posting proceeds in stages. Stage 1 (this stage) requires you to
- select how the article is to be manipulated. Please select one of
- the PFKs listed below.
-
- Newsgroups: mitre.techbb
- Path: linus!daemon
- From: M00000@mwvm.mitre.org (J. MITRE User)
- Subject: OR/MS Symposium
- Message-ID: <1991Oct15.114046.25682@linus.mitre.org>
- Sender: daemon@linus.mitre.org
- Organization: The MITRE Corp. Mail to News relay
- Distribution: mitre
- Date: Tue, 15 Oct 1991 11:40:46 GMT
- Lines: 41
-
-
-
-
-
- 1= Help 2= 3= Quit 4= 5= 6= Resume
- 7= 8= 9= Followup 10= Mail 11= Reply 12= ERASE
- ====>
- :FIGCAP.Sample Post Screen(1)
- :eFIG
- .pa
- :h3.Help -
- :p.The Help PFK will display the following information:
-
- .bf help
- .fo off
- You must come from the Article screen to get to Post Screen(1). This
- screen allows you to determine how to redirect an article.
-
-
- PFK Help - This Display.
- PFK Quit - Exit Post(1) screen.
- PFK Resume - Allows you to continue an existing POSTing. This is
- independent of the current article.
- PFK Followup - Newly edited information to be sent back to the server
- for POSTing.
- PFK Mail - Newly edited information to be directed to the local
- electronic mail system (must fill in recipient).
- PFK Reply - Newly edited information to be directed to the creator
- of an article (directed back to the "From:").
- PFK ERASE - Eliminate the previously edited POSTing to operate on
- the current article.
- .pf
- .fo on
- :h3.Quit -
- :p.Quitting here will not exit the NNR program. There is a hierarchical
- relationship among routines. Whenever you QUIT a screen you will return
- to the place you started from. In this case you will be returned to the
- Article screen and the current article.
- :h3.Resume -
- :p.The first posting panel is set up to detect the presence of a
- previously started article using this facility. If an article is
- detected you have the option to "Resume" or "ERASE" it. When the
- previous article is resumed the current article is discarded. You will
- be able to pick up the previous article where you left off.
- :h3.Followup -
- :p.When you follow-up on an article, you are replying back to the server
- and not the individual. NNR will do its best to preserve any information
- necessary to follow the prescribed conventions for posting. If for some
- reason you get interrupted, the newly generated article will be
- preserved until you resume via the "Resume" PFK or erase it using the
- "ERASE" PFK. When the article has been successfully posted, it will
- also be logged in the "NNRPMLOG" notebook.
- :h3.Mail -
- :p.When mailing an article to a friend or colleague you need to know
- their electronic address. NNR will search through your names file for
- any nicknames. When you fill in the "To:" field you must use very
- specific formats (see Post Screen(2) Help). When the article has been
- successfully mailed, it will be logged in the "NNRPMLOG" notebook.
- :h3.Reply -
- :p.When you reply to an article you are directing your response to the
- individual who posted the article. The return address is taken from the
- current article. When the article has been successfully sent, it will be
- logged in the "NNRPMLOG" notebook.
- :h3.ERASE -
- :p.The ERASE PFK will eliminate the previously edited POSTing/Mailing
- and operate on the current article.
- .pa
- :h2.Post Screen(2)
- :h3.General Help -
- :p.Bear in mind when you post an article that you are representing both
- yourself and MITRE to a potentially large audience. On the SHLI/Group
- screen you will see an indicator of whether posting is an option or not
- (y=posting, m=moderated, n=noposting). You may post at the Group level
- where only the group name is supplied, the Header level where the
- subject is supplied in addition to the group name and at the Article
- level where all available information is incorporated. There are groups
- available for testing this activity; "mitre.test" and "misc.test" are
- two such groups.
- :FIG place='inline'
- *** NNR/VM (R_1.3.0) *** Post(2)
-
- Posting proceeds in stages. On this screen you are required to fill
- in the highlighted fields and make any modifications to the header
- area. When the needed information has been supplied, please select
- from the PFK list below.
-
- From: NNRPROD@MBVM.Mitre.Org (Paul Campbell)
- Newsgroups: mitre.techbb
- Subject: Re: OR/MS Symposium
-
-
-
-
-
-
-
-
-
-
-
- 1= Help 2= 3= Quit 4= 5= Edit 6= Send
- 7= 8= 9= 10= 11= 12=
- ====>
- :FIGCAP.Sample Post Screen(2)
- :eFIG
- :h3.Help -
- :p.The Help PFK will display the following information:
-
- .bf help
- .fo off
- The Post Screen(2) allows you to modify any of the highlighted fields.
- It is highly recommended that no field be left blank; in some cases the
- MAIL or POST will fail. When sending MAIL use the following formats for
- the "To:" header (nicknames are supported):
-
- userid *or* userid@nodeid *or* userid@nodeid.domain.ext
- (* incorporate personal names as follows *)
- Firstname Lastname <userid@nodeid.domain.ext>
- userid@nodeid.domain.ext (Firstname Lastname)
-
- PFK Help - This Display.
- PFK Quit - Exit Post(2) screen.
- PFK Edit - Establishes a limited XEDIT session. When you come
- from the Article screen you will see the entire article
- is supplied.
- PFK Send - Will POST/MAIL the results of the edit session. You will
- receive confirmation that your contribution was
- successful.
- .pf
- .fo on
- :h3.Quit -
- :p.Quitting here will not exit the NNR program. There is a hierarchical
- relationship among routines. Whenever you QUIT a screen you will return
- to the place you started from. In this case you will be returned to the
- article last read.
- :h3.Edit -
- :p.Once you have either supplied the subject or allowed it to default
- you may create the text of your article. Using the Edit key will put you
- into an XEDIT session.
- :h3.Send -
- :p.After concluding your XEDIT session you will be back on the main
- posting screen. The Send PFK will initiate either the posting or mailing
- process. You should receive some confirmation at the end of this
- process. If you decide to "quit" rather than "send" your article, it
- will be saved for the next time you enter this screen.
- :h2.Xedit Screen (for Posting/Mailing)
- :h3.General Help -
- :p.This is a simple Xedit environment. If you are not familiar with
- Xedit don't despair since the PFKs available will do most, if not all,
- the operations necessary to compose a note. There are two basic
- mail/post scenarios. The first one is when you come from the Article
- Screen. In this case you will find the message-id and the contributor's
- name and address arranged in some conventional manner at the top of the
- note with the note itself to follow. In the second scenario where you do
- not come from the Article Screen, there is no other information
- available to include. In this case you will see
- .fo off
-
- * * * Top of File * * *
- * * * End of File * * *
-
- .fo on
- and you will be supplying the rest. To get started move the cursor to
- the line that contains "Top of File" and press the PF2 key.
-
- :FIG place='inline'
- *** NNR/VM (R_1.3.0) ***
- Posting to comp.compilers
-
-
-
-
-
-
-
-
-
- * * * Top of File * * *
- In article <monthly-Jan-92@comp.compilers>
- compilers-request@iecc.cambridge.ma.us (John R. Levine) writes:
-
- -------------------------- Original Message --------------------------
-
-
- Archive-name: compilers-faq
- 1= Help 2= Add line 3= Quit 4= Sign 5= Save 6= ?
- 7= Backward 8= Forward 9= Del line 10= Rgtleft 11= Spltjoin 12= Cursor
-
- ====>
- X E D I T 1 File
- :FIGCAP.Sample EDIT Screen
- :eFIG
- :h3.Help -
- :p.The Help PFK will display the CMS help file for the CMS NOTE
- command.
-
- .bf help
- .fo off
- Help - Returns help for CMS Note.
- Add line - Adds a line to the body of the note.
- Quit - Returns to Post Screen(2).
- Sign - Pulls in "userid Signature" file.
- Save - Saves file so you may continue with post/mail process.
- ? - Brings back previous command.
- Backward - Page Back.
- Forward - Page Forward.
- Del line - Deletes a line from the body of the note.
- Rgtleft - Toggle right or left.
- Spltjoin - Split or Join a line.
- Cursor - Toggle cursor between command line and cursor position.
- .pf
- :h1.Help
- :h2.General Help -
- .fo on
- :p.A summary Help is available from any NNR screen by choosing the PF1
- key.
- :FIG place='inline'
- *** NNR/VM (R_1.3.3) *** Help
-
- ** Headers Screen
- This screen collects pertinent info. from each article to display the
- originator and something about the content, based on the selection
- criteria (subject). CMS SUBSET honored; ENTER toggles cursor position.
-
- PFK Help - This display.
- PFK Article - Read a specific article. Cursor position respected.
- PFK Quit - Exit Headers screen.
- PFK Selected - Mark each article at the "." with an "x". Mark as many as
- desired, then press the Selected PFK.
- PFK Post - Initiates posting procedure. The group and subject are
- passed to the posting screen. Cursor position respected.
- PFK Mrk2Here - Marks all articles as read up to the cursor position or
- when cursor is on Command line, ALL articles are marked.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Thread - Collects articles based on subject.
- PFK Reduce - Eliminates read articles, "reduces" the number displayed.
- PFK Mrk/UMrk - Mark Article/UnMark Article toggle.
- PFK NxtGroup - Moves to the next group in the SHLI list.
-
- 1= NNR_Help 2= 3= Quit 4= 5= 6=
- 7= 8= 9= 10= 11= 12=
- ====>
- :FIGCAP.Typical Help Screen (from Headers)
- :eFIG
- :h2.NNR_Help -
- :p.This PFK will invoke the system help for NNR.
- :h2.Quit -
- :p.There is a hierarchical relationship among routines. Whenever you
- QUIT a screen you will return to the place you started from. In general,
- you may be returned to almost anywhere.
- :appendix
- :H1.Help at a Glance
- .bf help
- :h2.Help PHLI/Main screen
- .fo off
- Primary High Level Index and PFK definitions. CMS SUBSET is honored.
- ENTER toggles cursor position.
- Personal_Subscriptions - All those groups you are currently subscribed
- to. Treated the same as other HLIs.
- New_Groups_Since_mm/dd/yy - All new groups since you last read the news
- or 7-30 DAYSBACK.
- news - Description of news programs, etiquette and announcements.
- mitre - Contains all mitre related groups.
- PFK Help - This display.
- PFK All_News - Access all the news that is available. Articles read are
- not remembered. Move cursor to desired topic and press
- All_News PFK.
- PFK Quit - Exit NNR program.
- PFK New_News - Access news that is new to you according to "Groups Read"
- file on your account. Articles read are remembered.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Cursor - Toggles between current cursor position and command line.
- :h2.Help SHLI/Groups Screen
- .fo off
- Move the cursor to a group and press Headers, Articles or Post PFK.
- CMS SUBSET is honored. ENTER toggles cursor position.
-
- PFK Help - This display.
- PFK Articles - Access articles sequentially by article number. Starts with
- the first available article. Cursor position respected.
- PFK Quit - Exits this screen.
- PFK Headers - Preferred path to articles. Collects subject and other
- information for display. Cursor position respected.
- PFK Post - Initiates posting procedure. Only group passed to the
- posting screen. Cursor position respected.
- PFK Mark - Mark the group as been read, zeros the article count.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK UpdtGrp - Updates the Group.
- PFK Sub/UnS - Subscribe or UnSubscribe to a news group.
- PFK U_Prefer - Tailor user environment.
- PFK Power - Toggle between current Power setting. Initially OFF.
- :h2.Help Headers Screen
- .fo off
- This screen collects pertinent info. from each article to display the
- originator and something about the content, based on the selection
- criteria (subject). CMS SUBSET honored; ENTER toggles cursor position.
- PFK Help - This display.
- PFK Article - Read a specific article. Cursor position respected.
- PFK Quit - Exit Headers screen.
- PFK Selected - Mark each article at the "." with an "x". Mark as many as
- desired, then press the Selected PFK.
- PFK Post - Initiates posting procedure. The group and subject are
- passed to the posting screen. Cursor position respected.
- PFK Mrk2Here - Marks all articles as read up to the cursor position or
- when cursor is on Command line, ALL articles are marked.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Thread - Collects articles based on subject.
- PFK Reduce - Eliminates read articles, "reduces" the number displayed.
- PFK Mrk/UMrk - Mark Article/UnMark Article toggle.
- PFK NxtGroup - Moves to the next group in the SHLI list.
- :h2.Help U_Prefer Screen
- .fo off
- You may change any of the values listed but do so carefully since it
- is possible to run out of virtual storage!
-
- Articles/Group - used to determine the upper limit for the number of
- articles collected on "Headers Screen". Default is 300 articles.
-
- Lines/Article - used to determine the upper limit for the number of lines
- collected for an article on the "Article Screen". Default is 1500 lines.
-
- Log/NoLog - you may switch between logging all outgoing mail/post and
- not logging them. The default is "YES", log them.
-
- PFK Help - This display.
- PFK Quit - Exit Preferences screen.
- PFK Rotate - Range through possible configuration values.
- :h2.Help Article Screen
- .fo off
- Most commands honored from the command line. I try to screen out
- commands known to be disruptive to your NNR session.
-
-
- PFK Help - This display.
- PFK Next - Read the next article in the sequence.
- PFK Quit - Exit Article screen.
- PFK Previous - Read the previous article in the sequence.
- PFK PostMail - Initiates posting procedure. The group and subject are
- passed to the posting screen along with the article.
- PFK HeadBody - Toggles between headers+body and body only.
- PFK Backward - Scrolls backward one screen.
- PFK Forward - Scrolls forward one screen.
- PFK Print - Sends the article to the virtual printer.
- PFK Rot13 - Translates screen using a character rotation method.
- PFK Log - Logs article in NNRLOG NOTEBOOK.
- PFK NxtGroup - Moves to the next group in the SHLI list.
- :h2.Help Post Screen(1)
- .fo off
- You must come from the Article screen to get to Post Screen(1). This
- screen allows you to determine how to redirect an article.
-
-
- PFK Help - This Display.
- PFK Quit - Exit Post(1) screen.
- PFK Resume - Allows you to continue an existing POSTing. This is
- independent of the current article.
- PFK Followup - Newly edited information to be sent back to the server
- for POSTing.
- PFK Mail - Newly edited information to be directed to the local
- electronic mail system (must fill in recipient).
- PFK Reply - Newly edited information to be directed to the creator
- of an article (directed back to the "From:").
- PFK ERASE - Eliminate the previously edited POSTing to operate on
- the current article.
- :h2.Help Post Screen(2)
- .fo off
- The Post Screen(2) allows you to modify any of the highlighted fields.
- It is highly recommended that no field be left blank; in some cases the
- MAIL or POST will fail. When sending MAIL use the following formats for
- the "To:" header (nicknames are supported):
-
- userid *or* userid@nodeid *or* userid@nodeid.domain.ext
- (* incorporate personal names as follows *)
- Firstname Lastname <userid@nodeid.domain.ext>
- userid@nodeid.domain.ext (Firstname Lastname)
-
- PFK Help - This Display.
- PFK Quit - Exit Post(2) screen.
- PFK Edit - Establishes a limited XEDIT session. When you come
- from the Article screen you will see the entire article
- is supplied.
- PFK Send - Will POST/MAIL the results of the edit session. You will
- receive confirmation that your contribution was
- successful.
- .pf
- :H1.Network News Transfer Protocol (Excerpt)
- .fo off
-
- Network Working Group Brian Kantor (U.C. San Diego)
- Request for Comments: 977 Phil Lapsley (U.C. Berkeley)
- February 1986
-
- Network News Transfer Protocol
-
- A Proposed Standard for the Stream-Based
- Transmission of News
-
- Status of This Memo
-
- NNTP specifies a protocol for the distribution, inquiry, retrieval,
- and posting of news articles using a reliable stream-based
- transmission of news among the ARPA-Internet community. NNTP is
- designed so that news articles are stored in a central database
- allowing a subscriber to select only those items he wishes to read.
- Indexing, cross-referencing, and expiration of aged messages are also
- provided. This RFC suggests a proposed protocol for the ARPA-Internet
- community, and requests discussion and suggestions for improvements.
- Distribution of this memo is unlimited.
-
- 1. Introduction
-
- For many years, the ARPA-Internet community has supported the
- distribution of bulletins, information, and data in a timely fashion
- to thousands of participants. We collectively refer to such items of
- information as "news". Such news provides for the rapid
- dissemination of items of interest such as software bug fixes, new
- product reviews, technical tips, and programming pointers, as well as
- rapid-fire discussions of matters of concern to the working computer
- professional. News is very popular among its readers.
-
- There are popularly two methods of distributing such news: the
- Internet method of direct mailing, and the USENET news system.
-
- 1.1. Internet Mailing Lists
-
- The Internet community distributes news by the use of mailing lists.
- These are lists of subscriber's mailbox addresses and remailing
- sublists of all intended recipients. These mailing lists operate by
- remailing a copy of the information to be distributed to each
- subscriber on the mailing list. Such remailing is inefficient when a
- mailing list grows beyond a dozen or so people, since sending a
- separate copy to each of the subscribers occupies large quantities of
- network bandwidth, CPU resources, and significant amounts of disk
- storage at the destination host. There is also a significant problem
- in maintenance of the list itself: as subscribers move from one job
- to another; as new subscribers join and old ones leave; and as hosts
- come in and out of service.
-
- 1.2. The USENET News System
-
- Clearly, a worthwhile reduction of the amount of these resources used
- can be achieved if articles are stored in a central database on the
- receiving host instead of in each subscriber's mailbox. The USENET
- news system provides a method of doing just this. There is a central
- repository of the news articles in one place (customarily a spool
- directory of some sort), and a set of programs that allow a
- subscriber to select those items he wishes to read. Indexing,
- cross-referencing, and expiration of aged messages are also provided.
-
- 1.3. Central Storage of News
-
- For clusters of hosts connected together by fast local area networks
- (such as Ethernet), it makes even more sense to consolidate news
- distribution onto one (or a very few) hosts, and to allow access to
- these news articles using a server and client model. Subscribers may
- then request only the articles they wish to see, without having to
- wastefully duplicate the storage of a copy of each item on each host.
-
- 1.4. A Central News Server
-
- A way to achieve these economies is to have a central computer system
- that can provide news service to the other systems on the local area
- network. Such a server would manage the collection of news articles
- and index files, with each person who desires to read news bulletins
- doing so over the LAN. For a large cluster of computer systems, the
- savings in total disk space is clearly worthwhile. Also, this allows
- workstations with limited disk storage space to participate in the
- news without incoming items consuming oppressive amounts of the
- workstation's disk storage.
-
- We have heard rumors of somewhat successful attempts to provide
- centralized news service using IBIS and other shared or distributed
- file systems. While it is possible that such a distributed file
- system implementation might work well with a group of similar
- computers running nearly identical operating systems, such a scheme
- is not general enough to offer service to a wide range of client
- systems, especially when many diverse operating systems may be in use
- among a group of clients. There are few (if any) shared or networked
- file systems that can offer the generality of service that stream
- connections using Internet TCP provide, particularly when a wide
- range of host hardware and operating systems are considered.
-
- NNTP specifies a protocol for the distribution, inquiry, retrieval,
- and posting of news articles using a reliable stream (such as TCP)
- server-client model. NNTP is designed so that news articles need only
- be stored on one (presumably central) host, and subscribers on other
- hosts attached to the LAN may read news articles using stream
- connections to the news host.
-
- NNTP is modelled upon the news article specifications in RFC 850,
- which describes the USENET news system. However, NNTP makes few
- demands upon the structure, content, or storage of news articles, and
- thus we believe it easily can be adapted to other non-USENET news
- systems.
-
- Typically, the NNTP server runs as a background process on one host,
- and would accept connections from other hosts on the LAN. This works
- well when there are a number of small computer systems (such as
- workstations, with only one or at most a few users each), and a large
- central server.
-
- 1.5. Intermediate News Servers
-
- For clusters of machines with many users (as might be the case in a
- university or large industrial environment), an intermediate server
- might be used. This intermediate or "slave" server runs on each
- computer system, and is responsible for mediating news reading
- requests and performing local caching of recently-retrieved news
- articles.
-
- Typically, a client attempting to obtain news service would first
- attempt to connect to the news service port on the local machine. If
- this attempt were unsuccessful, indicating a failed server, an
- installation might choose to either deny news access, or to permit
- connection to the central "master" news server.
-
- For workstations or other small systems, direct connection to the
- master server would probably be the normal manner of operation.
-
- This specification does not cover the operation of slave NNTP
- servers. We merely suggest that slave servers are a logical addition
- to NNTP server usage which would enhance operation on large local
- area networks.
-
- 1.6. News Distribution
-
- NNTP has commands which provide a straightforward method of
- exchanging articles between cooperating hosts. Hosts which are well
- connected on a local area or other fast network and who wish to
- actually obtain copies of news articles for local storage might well
- find NNTP to be a more efficient way to distribute news than more
- traditional transfer methods (such as UUCP).
-
- In the traditional method of distributing news articles, news is
- propagated from host to host by flooding - that is, each host will
- send all its new news articles on to each host that it feeds. These
- hosts will then in turn send these new articles on to other hosts
- that they feed. Clearly, sending articles that a host already has
- obtained a copy of from another feed (many hosts that receive news
- are redundantly fed) again is a waste of time and communications
- resources, but for transport mechanisms that are single-transaction
- based rather than interactive (such as UUCP in the UNIX-world <1>),
- distribution time is diminished by sending all articles and having
- the receiving host simply discard the duplicates. This is
- especially true when communications sessions are limited to once a
- day.
-
- Using NNTP, hosts exchanging news articles have an interactive
- mechanism for deciding which articles are to be transmitted. A host
- desiring new news, or which has new news to send, will typically
- contact one or more of its neighbors using NNTP. First it will
- inquire if any new news groups have been created on the serving host
- by means of the NEWGROUPS command. If so, and those are appropriate
- or desired (as established by local site-dependent rules), those new
- newsgroups can be created.
-
- The client host will then inquire as to which new articles have
- arrived in all or some of the newsgroups that it desires to receive,
- using the NEWNEWS command. It will receive a list of new articles
- from the server, and can request transmission of those articles that
- it desires and does not already have.
-
- Finally, the client can advise the server of those new articles which
- the client has recently received. The server will indicate those
- articles that it has already obtained copies of, and which articles
- should be sent to add to its collection.
-
- In this manner, only those articles which are not duplicates and
- which are desired are transferred.
-
- :egdoc
-